[jdom-interest] Help with <xsl:text disable-output-escaping="yes">

Laurent Bihanic laurent.bihanic at atosorigin.com
Tue Sep 10 00:55:32 PDT 2002


disable-output-escaping only applies when the XSLT processor outputs the 
result as XML ou HTML. It does not apply when the output is a SAX event flow 
as it is the case when you use JDOMResult.
JDOM receives a sequence of characters and, when requested to ouput the 
document as XML, performs the escaping so that the output XML represents the 
actual JDOM document content. In your case, this content is text.

The only way JDOM could reproduce Xalan behaviour would be for XMLOutputter to 
interpret the <?javax.xml.transform.disable-output-escaping?> PI.


Emmett McLean wrote:
> Hi,
> It appears what disable-output-escaping works in xalan
> but not in JDOM. I wonder you know of a way to enable it?
> I have an XSLT which works fine with an XML file if I
> do the transformation on the command line using xalan.
> However, when I do the transform in JDOM the following code
> which works OK in xalan ...
> <xsl:text disable-output-escaping="yes">
> <![CDATA[
> <style type="text/css">
> <!--
> body { font-family: Arial, Verdana, sans-serif; background-color: #FFFFFF}
> -->
> </style>
> ]]>
> </xsl:text>
> Gets rendered in JDOM as ...
> <?javax.xml.transform.disable-output-escaping?>
> &lt;style type="text/css"&gt;
> &lt;!--
> body { font-family: Arial, Verdana, sans-serif; background-color: #FFFFFF}
> --&gt;
> &lt;/style&gt;
> In otherwords the disable-output-escaping tag fails.
> I can email both the xsl and xml if someone would like to experiment.
> Thanks,
> em

More information about the jdom-interest mailing list