XSL: Avoid exporting namespace defintions to resulting XML documents?

You can use the exclude-result-prefixes attribute of the xsl:stylesheet element to suppress namespaces from the output document: To suppress multiple namespaces from the output document specify them separated by whitespace: exclude-result-prefixes="ns1 ns2 ns3" From the XSLT specification: When a stylesheet uses a namespace declaration only for the purposes of addressing the source tree, specifying the prefix in the exclude-result-prefixes attribute will avoid superfluous namespace declarations in the result tree.

Divo's answer was already chosen, and appropriately so. But if you're interested in digging deeper, check out the "Too many namespaces" section in my magnum opus on the wildly popular topic of "Namespaces in XSLT". (Yes, that's meant to be tongue-in-cheek.

:-) ).

– 0xA3 May 13 '09 at 9:43 We're using extension-element-prefixes and it works just fine. – alamar May 13 '09 at 9:52 extension-element-prefixes does have the same effect, but it has an additional effect. Any elements that you put in one of those namespaces will be interpreted as an extension element (rather than a literal result element).

That may well be appropriate for the examples you have in your answer. But if you don't want that additional behavior, then just use exclude-result-prefixes – Evan Lenz May 13 '09 at 10:08.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions