This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: CDATA in XSLT output
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] CDATA in XSLT output
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Thu, 18 Oct 2001 10:09:49 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> For example, how would I modify XSLT code that looks like this:
>
> <root>
> <node><xsl:value-of select="value" /></node>
> </root>
>
> to produce an output like this:
>
> <root>
> <node><![CDATA[ This is my value ]]></node>
> </root>
<xsl:output cdata-section-elements="node"/>
But note, this only gives you limited control. The bottom line is, you
shouldn't care whether the output is in CDATA, because
<node><![CDATA[This is my value & I like it]]></node>
is equivalent, in the data model, to
<node>This is my value & I like it</node>
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list