[ http://issues.apache.org/jira/browse/XALANJ-2228?page=comments#action_12356963 ]
Christine Li commented on XALANJ-2228: -------------------------------------- It is a valid bug for XSLTC. Simplified test case: XML document: <r><b/>&<a/></r> Stylesheet: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output omit-xml-declaration='yes' /> <xsl:template match='/'> <xsl:variable name='content'> <xsl:apply-templates /> </xsl:variable> <xsl:copy-of select='$content' /> </xsl:template> <xsl:template match='a'> <xsl:text disable-output-escaping='yes'>&</xsl:text> </xsl:template> <xsl:template match='b'> <b/> </xsl:template> </xsl:stylesheet> > When using XSLTC, RTF in variable has lost escaping information > --------------------------------------------------------------- > > Key: XALANJ-2228 > URL: http://issues.apache.org/jira/browse/XALANJ-2228 > Project: XalanJ2 > Type: Bug > Components: XSLTC > Versions: Latest Development Code, 2.6 > Environment: Java 5, XSLTC > Reporter: Libor Valenta > Attachments: TestEscaping.java > > I created simple test case that passes with interpretive processor, but fails > with XSLTC. > The disable-output-escaping is lost! I looked into > AdaptiveResultTreeImpl.prepareNewDOM() and also SAX2DTM.characters(ch[], int, > int) both looks suspicious. > I managed to "fix" it, by adding line > processingInstruction(escape ? Result.PI_ENABLE_OUTPUT_ESCAPING : > Result.PI_DISABLE_OUTPUT_ESCAPING, ""); into > AdaptiveResultTreeImpl.setEscaping(boolean escape) > It has 2 effects > 1. Switch to dom earlier, before AdaptiveResultTreeImpl.prepareNewDOM() can > mess things up > 2. forces text with different escaping in different nodes, they cannot be > coalesced by SAX2DTM.characters() > But there must be some cleaner way to fix it. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]