Thanks for reporting this. I'll look into it and ensure that the documentation and the code are consistent on how this is treated.


Michael Kay

From: Laurent CAPRANI []
Sent: 04 February 2010 18:05
Subject: [saxon] -strip:all strips whitespace from the result tree

The –strip:all option yields unexpected results.


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


Produces this



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.




-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