DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30681>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30681

<xsl:namespace-alias stylesheet-prefix="foo" result-prefix="#default" />





------- Additional Comments From [EMAIL PROTECTED]  2004-09-02 18:17 -------
I don't believe the text in Section 7.1.1 of XSLT 1.0 [1] is clear one way or 
the other.  Given something like the following:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
                xmlns:style="http://example.org/style";
                xmlns:res="http://example.org/res";>
  <xsl:namespace-alias stylesheet-prefix="style" result-prefix="res"/>
  <xsl:template match="/">
    <style:out/>
  </xsl:template>
</xsl:stylesheet>

the text in 7.1.1 of XSLT 1.0 doesn't clearly indicate which of the following 
forms the result document ought to take:

<style:out xmlns:style="http://example.org/res"/>

or 

<res:out xmlns:res="http://example.org/res"/>

However, Section 11.1.4 of XSLT 2.0 [2] guide much stronger guidance.  It states

<<
When a literal result element is processed, its namespace nodes are handled as 
follows:

o A namespace node whose string value is a literal namespace URI is not 
  copied to the result tree.

o A namespace node whose string value is a target namespace URI is copied to
  the result tree, whether or not the URI identifies an excluded namespace.
>>

Where the 1.0 document can be read as recommending a substitution of the URIs 
in the namespace declarations in the result, the 2.0 document makes it clear 
that the more desirable outcome would be for the actual prefix specified by 
result-prefix to be used, if a namespace declaration assocating that prefix 
with that URI is in scope for the literal result element.

I think we can assume that the intent of the 1.0 document was the same, and 
that the serializer should attempt to use the default namespace if possible, as 
Galen suggests.

[1] http://www.w3.org/TR/xslt#literal-result-element
[2] http://www.w3.org/TR/xslt20/#element-namespace-alias

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to