Subject: Re: [xsl] Attributes with default namespaces? XSLT Rec question.. From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Thu, 13 Nov 2008 11:58:46 -0500 |
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=""/>
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."
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?
-- Upcoming XSLT/XSL-FO hands-on courses: Wellington, NZ 2009-01 Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video sample lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg Video course overview: http://www.youtube.com/watch?v=VTiodiij6gE G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Attributes with default names, Geert Josten | Thread | RE: [xsl] Attributes with default n, Geert Josten |
Re: [xsl] basic processors handling, Andrew Welch | Date | RE: [xsl] basic processors handling, Michael Kay |
Month |