<snip/> Hi Henry,
I took a quick look at the source code, and I suspect this is a bug in the processor. It looks like the processor is always ignoring whitespace characters that are reported through the ContentHandler.ignorableWhitespace method, even if that was in the content of an xsl:text instruction.
Thanks for taking a look. We've been looking too, but aren't too familiar with the code yet....
Do you happen to know whether the characters in the content of the xsl:text are being reported through ContentHandler.ignorableWhitespace or through ContentHandler.characters? If the former, would it be possible for you to try using the characters method as a work-around instead - you mentioned that you're generating the stylesheet programmatically using SAX events.
Actually we use the ContentHandler.characters method to report the space inside the <xsl:text> element. Could there be a bug here too? Thanks, Chris