[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xsl:copy and disable-output-escaping

Subject: Re: xsl:copy and disable-output-escaping
From: Michael Ludwig <mlu@xxxxxxxxxxxxx>
Date: Tue, 07 Oct 2008 10:15:09 +0200
Re:  xsl:copy and disable-output-escaping
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.