I started using XSLTC but I have problem with results it produces.
I have
XML:
<a>&<b/>&</a>
XSL:
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="no" omit-xml-declaration="yes" />
<xsl:template match="/">
<result>
<xsl:apply-templates />
</result>
</xsl:template>
<xsl:template match="b">
<xsl:text disable-output-escaping="yes">&</xsl:text>
</xsl:template>
</xsl:stylesheet>
I would expect to have in result (see processing instructions)
[[Text: &], [ProcessingInstruction: <?javax.xml.transform.disable-output-escaping?>], [Text: &], [ProcessingInstruction: <?javax.xml.transform.enable-output-escaping?>], [Text: &]]
not
[[Text: &], [ProcessingInstruction: <?javax.xml.transform.disable-output-escaping?>], [Text: &], [ProcessingInstruction: <?javax.xml.transform.disable-output-escaping?>], [Text: &]]
For example in org.apache.xml.serializer.ToXMLSAXHandler m_escapeSetting is by default false
The start of <xsl:text disable-output-escaping="yes"> will call setEscaping(false) which return false - the old value
At the end of </xsl:text> will be called setEscaping(false) - where false is the original value returned by previous call.
m_escapeSetting will never be true, but most importantly the resulting DOM makes no sense.
also org.apache.xalan.xsltc.runtime.StringValueHandler.setEscaping(boolean bool) looks fishy, I tnink it should retrurn the old value.