You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2003/10/30 22:34:48 UTC
DO NOT REPLY [Bug 24268] New: -
XSLTC, disable-output-escaping="yes" works on xsl:value-of but not xsl:text
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24268>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24268
XSLTC, disable-output-escaping="yes" works on xsl:value-of but not xsl:text
Summary: XSLTC, disable-output-escaping="yes" works on xsl:value-
of but not xsl:text
Product: XalanJ2
Version: CurrentCVS
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Xalan-Xsltc
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: minchau@ca.ibm.com
If you run this input XML:
-------------------------
<?xml version="1.0" encoding="UTF-8"?>
<doc>
<foo>&'<>Z</foo>
</doc>
-------------------------
with this stylesheet:
-------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" encoding="UTF-8" />
<xsl:template match="doc">
<HTML>
<BODY>
<P><xsl:text disable-output-escaping="yes"><xsl:value-of
select="foo" /></xsl:text></P>
<P><xsl:value-of select="foo" disable-output-escaping="yes" /></P>
<P><xsl:text disable-output-
escaping="yes">&'<>Z</xsl:text></P>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
-------------------------
The output for XSLTC is:
<HTML>
<BODY>
<P>&'<>Z</P>
<P>&'<>Z</P>
<P>&'<>Z</P>
</BODY>
</HTML>
I had expected all three <P>...</P> to be the same, but the first one is escaped
(except for ' ).
When run with Xalan-J interpreteive I get an error:
; SystemID: file:///D:/temp/bug.xsl; Line#: 7; Column#: 73
; SystemID: file:///D:/temp/bug.xsl; Line#: 7; Column#: 73
javax.xml.transform.TransformerException: xsl:value-of is not allowed in this
position in the stylesheet!