[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Saxon output unused namespace declarations

Subject: Saxon output unused namespace declarations
From: Weihua JIANG <weihua.jiang@xxxxxxxxx>
Date: Thu, 23 Jul 2009 17:11:16 +0800
 Saxon output unused namespace declarations
I am using SAXONB  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">
B  <xsl:param name="p1" select="(xs:anyURI('one.uri'),
xs:anyURI('eins.uri'))"/>
B  <xsl:param name="p2" select="(xs:anyURI('two.uri'),
xs:anyURI('zwei.uri'))"/>
<out>
B  <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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.