W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2003

[XSLT2] 11.1.4 ns alias: implementation-dependent prefixes

From: Oliver Becker <obecker@informatik.hu-berlin.de>
Date: Mon, 1 Sep 2003 11:51:52 +0200 (MEST)
Message-Id: <200309010951.h819pqTa018871@mail.informatik.hu-berlin.de>
To: public-qt-comments@w3.org

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 Monday, 1 September 2003 05:51:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:49 UTC