To prevent parser from converting your entity, you have to mark it as
unparsed data. The following works:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text"/>
<xsl:template match="/">
<HTML>
<![CDATA[\]]>
</HTML>
</xsl:template>
</xsl:stylesheet>
Please note, that the result is not escaped only because of the text
output method. In case of xml or html output methods you would need
something like this:
<xsl:text disable-output-escaping="yes"><![CDATA[\]]></xsl:text>
Nice isn't it? It really doesn't look like an intended way of using
XSLT. Converting by parser and sending the resulting character with an
appropriate code page seems to be more natural to me.
Petr
Anthony Gaudio wrote:
>
>
> Can anyone tell me which method or methods that are used that control
> how HTML entities are parsed for output?
>
> I don't want Sablotron to convert the HTML entities into the actual
> character they represent. I want the browser to deal with that.
>
> example:
>
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
> <xsl:output method="text"/>
> <xsl:template match="/">
> <HTML>
> \
> </HTML>
> </xsl:template>
> </xsl:stylesheet>
>
> when used with an XML document the result I would get is:
> <HTML>\</HTML>
>
> I would like the result to be:
> <HTML>\</HTML>
>
> Thanks,
> - Anthony
--
Petr Cimprich
Ginger Alliance Ltd.
www.gingerall.com