This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: CDATA in XSLT output


> 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 &amp; I like it</node>

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]