This was a good practical example of creating HTML   entity, which is
not so trivial.
I have been doing it this way:
<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>


Andrey

----- Original Message -----
From: "Petr Cimprich" <[EMAIL PROTECTED]>
To: "Sablotron Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, December 15, 2000 9:55 AM
Subject: [Sab] HTML entities (was Sablotron Mailing List)


> 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[&#92;]]>
> </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[&#92;]]></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>
> >         &#92;
> > </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>&#92</HTML>
> >
> > Thanks,
> > - Anthony
>
> --
> Petr Cimprich
> Ginger Alliance Ltd.
> www.gingerall.com
>

Reply via email to