[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Excluding Namespaces from the Result Tree

Subject: Re: Excluding Namespaces from the Result Tree
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 30 Jun 2015 10:00:11 -0000
Re:  Excluding Namespaces from the Result Tree
> On 30 Jun 2015, at 10:11, Martin Honnen martin.honnen@xxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> 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.

With hindsight, though, Im sure we could have designed it better: excluding
namespaces that arent used in element or attribute names should probably have
been the default.

Michael Kay
Saxonica

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.