[ http://issues.apache.org/jira/browse/XALANJ-2300?page=comments#action_12418313 ]
Brian Minchau commented on XALANJ-2300: --------------------------------------- Andre, issue XALANJ-2218 already fixes part of your problem, the field ToXMLSAXHandler.m_escapeSetting has an initial value of true (as you suggest). The patch in XALANJ-2218 was already applied to the latest code. It isn't in the published 2.7 release but would make the next release or point release. The patch for 2218 also catches a few other spots where the serializer gets re-set, but essentially you are correct on this field's initial value. As for your suggestion on org.apache.xalan.xsltc.runtime.StringValueHandler, I suspect that you might be right, but haven't looked into that part. - Brian Minchau > Bug with disable-output-escaping when using XSLTC and 2 TransformerHandler > -------------------------------------------------------------------------- > > Key: XALANJ-2300 > URL: http://issues.apache.org/jira/browse/XALANJ-2300 > Project: XalanJ2 > Type: Bug > Components: XSLTC > Versions: 2.7 > Reporter: Andre Powroznik > > Disable-output-escaping does not work correctly in this case : it is always > disabled, where it should be disabled the first time and enabled the second > time. > === Bug.java === > import java.io.File; > import javax.xml.transform.sax.SAXResult; > import javax.xml.transform.sax.SAXTransformerFactory; > import javax.xml.transform.sax.TransformerHandler; > import javax.xml.transform.stream.StreamResult; > import javax.xml.transform.stream.StreamSource; > import org.jdom.Element; > import org.jdom.output.SAXOutputter; > public class Bug { > public static void main(String[] args) throws Exception { > Element something = new Element("something"); > something.addContent("<a > href=\"http://www.google.com\">Google</a>"); > System.setProperty("javax.xml.transform.TransformerFactory", > > "org.apache.xalan.xsltc.trax.TransformerFactoryImpl"); > SAXTransformerFactory factory = (SAXTransformerFactory) > SAXTransformerFactory > .newInstance(); > System.out.println("factory = " + factory); > TransformerHandler handler1 = factory > .newTransformerHandler(new StreamSource(new > File("foo.xsl"))); > TransformerHandler handler2 = factory.newTransformerHandler(); > handler2.setResult(new StreamResult(System.out)); > handler1.setResult(new SAXResult(handler2)); > new SAXOutputter(handler1).output(something); > } > } > === foo.xsl === > <?xml version="1.0"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > <xsl:template match="/"> > Yes: <xsl:value-of select="/something" > disable-output-escaping="yes" /> > No: <xsl:value-of select="/something" > disable-output-escaping="no" /> > </xsl:template> > </xsl:stylesheet> -- 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]
