[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|