[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Excluding Namespaces from the Result Tree


Subject: Re: [xsl] Excluding Namespaces from the Result Tree
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 30 Jun 2015 09:11:35 -0000

Heiko Niemann kontakt@xxxxxxxxxxxxxxxx wrote:

using XSLT 2.0 there is the value #all for the attribute
exclude-result-prefixes. I try to find cases where you would NOT want to
use it, in other words why would you want to keep namespaces in the result
tree that are not used there? Which leads to the question why cleaning up
namespaces is not a default behavior.

With XML ou can use qualified names not only as names for nodes but also in element or attribute values, for instance if you want to construct an XSD schema with XSLT, and in that case if you want for instance to have


<xs:element ref="pf1:foo"/>

in your result then, even if the prefix 'pf1' is not used in element or attribute names, you want to preserve its declaration.


Current Thread
Keywords