RE: [XSLT2] 11.1.4 ns alias: implementation-dependent prefixes

Oliver, I would be grateful if you could look through the revised rules for
xsl:namespace-alias. I think that they meet the concerns you expressed here,
but on all matters concerning namespaces, your analysis is always welcome!

We didn't say anything specific about the interaction of #default with
attributes. If you specify <xsl:namespace-alias stylesheet-prefix="#default"
result-prefix="zzz"/>, then if the default namespace is "x.uri", and there
is an attribute node whose namespace uri is "x.uri", then the namespace URI
of this attribute is changed. This is an unlikely situation, but the effect
is well-defined.

I believe that the final note in section 11.1.4 concerning the xml namespace
is actually incorrect. I wrote it before we put in the revised rules on
copying namespace nodes, and it's no longer a problem. It's perfectly OK, I
think, (and indeed useful) to do:

<xsl:stylesheet xmlns:axml="axml.uri">
<xsl:namespace-alias stylesheet-prefix="axml" result-prefix="xml"/>

  <e axml:base="target.uri"/>

and the output will be

  <a xml:base="target.uri"/>

I'll treat this error as a last call comment.

Regards and thanks for the input,

Michael Kay

> -----Original Message-----
> From: Oliver Becker [mailto:obecker@informatik.hu-berlin.de] 
> Sent: 01 September 2003 10:52
> To: public-qt-comments@w3.org
> Subject: [XSLT2] 11.1.4 ns alias: implementation-dependent prefixes
> 
> 
> 
> Section 11.1.4 (Namespace Aliasing) of the XSLT 2.0 WD states 
> that "The namespace prefix that will be used in the 
> serialized output document 
> is implementation-dependent."
> 
> I think the specification should either provide a way to let 
> the user choose the serialized prefix, or define unambigously 
> which prefix will be used.
> 
> I have two use cases in mind:
> 1. The prefix (within a QName) appears within the data of the 
> resulting XML. For example, a stylesheet that generates a 
> stylesheet which in turn processes as stylesheet. 
> <xsl:template match="...">
>    <axsl:template match="xsl:template"> <!-- or 
> match="axsl:template" ? -->
>       ...
>    </axsl:template>
> </xsl:template>
> 
> Saxon 7.6.5 chooses to use the xsl prefix, so only the 
> version above works. Xalan 2.5.1 uses the axsl prefix, so 
> only the other version would work. (Saxon 6.5.3 declares both 
> prefixes in the result, so this might be a solution.)
> 
> 2. The result uses the xml namespace 
> http://www.w3.org/XML/1998/namespace.
> <xsl:namespace-alias 
> stylesheet-prefix="axml" result-prefix="xml" />  
> <xsl:template match="...">
>    <result axml:space="preserve">
>       <xsl:apply-templates />
>    </result>
> </xsl:template>
> According to XML Namespaces 1.1 (Section 3; Namespace constraints), 
> no other than the xml prefix may be bound to the namespace 
> http://www.w3.org/XML/1998/namespace.
> 
> That means in this case the result shouldn't use the axml 
> prefix for the serialized output.
> 
> Regards,
> Oliver Becker
> 
> 
> /-------------------------------------------------------------------\
> |  ob|do        Dipl.Inf. Oliver Becker                             |
> |  --+--        E-Mail: obecker@informatik.hu-berlin.de             |
> |  op|qo        WWW:    http://www.informatik.hu-berlin.de/~obecker |
> \-------------------------------------------------------------------/
> 

Received on Thursday, 13 November 2003 11:22:54 UTC