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

Attributes with default namespaces? XSLT Rec question.

Subject: Attributes with default namespaces? XSLT Rec question..
From: Geert Josten <Geert.Josten@xxxxxxxxxxx>
Date: Thu, 13 Nov 2008 17:50:41 +0100
 Attributes with default namespaces? XSLT Rec question.
Hi all,

A question about the XSLT recommendation..

If you add the following to your XSLT stylesheet:
        <test xmlns="http://test">
                <xsl:attribute name="test"/>
        </test>

What namespace should that attribute receive? Should the result be:
        <test xmlns="http://test" test=""/>

..or (something like)
        <test xmlns="http://test" _:test="" xmlns:_="" />

[ Please read on first.. ;-) ]

The XSLT 2.0 recommendation states:
        "If the namespace attribute is not present, then the lexical Qname
         is expanded into an expanded-QName using the namespace declarations
         in effect for the xsl:attribute element, not including any default
         namespace declaration."

        (http://www.w3.org/TR/xslt20/#creating-attributes, 9th paragraph or
so)

The xsl:attribute has no namespace attribute, and the lexical Qname contains
no prefix. But since de default namespace declaration should not be included
in resolving/expanding the Qname, I would expect the latter result should
appear. However, the latter is not valid according to:
        (http://www.w3.org/TR/REC-xml-names/#ns-decl, 2nd paragraph or so)

..nor does any of the common implementations give that result, the all return
the first..

Am I misinterpreting the XSLT recommendation?

Kind regards,
Geert


Drs. G.P.H. Josten
Consultant


http://www.daidalos.nl/
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
http://www.daidalos.nl/
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit
bericht kunnen geen rechten worden ontleend.

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.