[ 
http://issues.apache.org/jira/browse/XALANJ-2300?page=comments#action_12416467 
] 

Andre Powroznik commented on XALANJ-2300:
-----------------------------------------

Moreover, I'm wondering if:
- shouldnt' the default value of the "m_escapeSetting" variable in 
"org.apache.xalan.serializer.ToHTMLSAXHandler" set to "true" instead of 
"false"? (case of output-method=html) ;
- shouldn't the "setEscaping" method in 
"org.apache.xalan.xsltc.runtime.StringValueHandler" return "oldEscaping" 
instead of "bool"? (the "setEscaping" method is supposed to return the previous 
escaping value).

> 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]

Reply via email to