You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Brian Young <Br...@sas.com> on 2000/08/31 21:51:47 UTC
How to make " resolve as "?
Hello,
I have the following in my XML:
<string><![CDATA[Text containing special chars like &, <, >, ", etc.]]></string>
I also have the following XSL to read in this string and (hopefully) fully output escape it and embed it within some java code I'm creating:
<xsl:text disable-output-escaping="yes">object.setText("</xsl:text><xsl:value-of select="string" /><xsl:text disable-output-escaping="yes">");</xsl:text>
This results in:
object.setText("Text containing special chars like &, <, >, ", etc.");
Which is not cool, as the " did not get escaped as a " and prematurely terminates my string. I'd like:
object.setText("Text containing special chars like &, <, >, ", etc.");
I figured since " was considered one of the standard entities (with & < > and ') that it would be escaped along with the others. Is there something I am doing wrong? If not, is there something I can do to force escaping of "?
Thanks,
Brian Young