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

Subject: Re: [xsl] xsl:copy and disable-output-escaping
From: Michael Ludwig <mlu@xxxxxxxxxxxxx>
Date: Tue, 07 Oct 2008 10:15:09 +0200
Guenstig und Gut schrieb:
       <xsl:variable name="test"><xsl:text

<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

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

Current Thread