Setting expand-text="yes" in an XSLT stylesheet appears to cause extra whitespace to be emitted in the output XML. For example, this stylesheet:
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
expand-text="no"
version="3.0">
<xsl:template match="/">
<xsl:text>A</xsl:text>
<xsl:text>B</xsl:text>
</xsl:template>
</xsl:stylesheet>
produces the output AB
. But if I change it to expand-text="yes"
then it produces A B
.
Can anyone help explain this behavior? Is it by design? I am using Saxon-PE 9.6.0.7.
Thanks, Josh.