This bug is now logged, and a fix has been committed to Subversion.
 

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay



From: Laurent CAPRANI [mailto:laurent.caprani@laposte.net]
Sent: 04 February 2010 18:05
To: saxon-help@lists.sourceforge.net
Subject: [saxon] -strip:all strips whitespace from the result tree

The –strip:all option yields unexpected results.

 

<xsl:template match="/">
=========v
Please do<xsl:text> </xsl:text><xsl:text>not </xsl:text>strip<xsl:value-of select="' '"/>whitespace!
=========^
</xsl:template>

 

Produces this

 

=========v

Please donot strip whitespace!

=========^

 

Whitespace-only result nodes get stripped. It seems like literal result tree fragments are "source documents".

 

Maybe the manual (1), which only mentions document(), should warn about this.

 

(1)

http://www.saxonica.com/documentation/using-xsl/commandline.html

 

-strip:all Specifies what whitespace is to be stripped from source documents (applies both to the principal source document and to any documents loaded for example using the document() function.

 

-- Laurent CAPRANI

   Montréal