xsl-list
[Top] [All Lists]

Re: [xsl] xsl:copy and disable-output-escaping

2008-10-07 04:15:34
Guenstig und Gut schrieb:
       <xsl:variable name="test"><xsl:text
disable-output-escaping="yes"><![CDATA[<b>5</b>]]></xsl:text></xsl:variable>

       <xsl:copy-of select="$test"></xsl:copy-of>

As Michael Kay explained on the Saxon list: "disable-output-escaping has
no effect unless the text nodes you are creating are passed directly to
the serializer, because escaping is something that the serializer does.
When variables are created, you are constructing nodes in a tree; no
escaping is done, and therefore there is nothing to disable."

The output of $test in any browser is <b>5</b> but I want that the
number 5 is bold.

I know that I could write <b>5</b> without <xsl:text> and without
CDATA.

So why don't you just do that? This is the solution to your problem. If
you feel it is not, you probably haven't exposed your problem well
enough.

Michael Ludwig

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>