xsl-list
[Top] [All Lists]

[xsl] Saxon output unused namespace declarations

2009-07-23 05:11:49
I am using SAXON  9.1.0.6J under Linux for XSLT 2.0.

For following stylesheet:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="2.0" >
<xsl:template match="/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
  <xsl:param name="p1" select="(xs:anyURI('one.uri'), xs:anyURI('eins.uri'))"/>
  <xsl:param name="p2" select="(xs:anyURI('two.uri'), xs:anyURI('zwei.uri'))"/>
<out>
  <xsl:value-of select="$p1 != $p2"/> should be true
</out>
</xsl:template>
</xsl:stylesheet>

Saxon get the output as
<?xml version="1.0" encoding="UTF-8"?><out
xmlns:xs="http://www.w3.org/2001/XMLSchema";>true should be true
</out>

I am wondering why the namespace declaration for xmlns:xs is
outputted. This namespace declaration is not used by the out element.
So, from my opinion, to make the output as simple as possible, the
XSLT 2.0 processor shall not output such declaration.

But, since Saxon is the de facto XSLT 2.0 standard implementation. I
guess this complies with XSLT 2.0 spec. Can anyone tell whether there
is any statements in XSLT 2.0 spec saying something about it?

Thanks
Weihua

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>