[xsl] Re: CDATA output

Subject: [xsl] Re: CDATA output
From: Nathan Shaw <n8_shaw@xxxxxxxxx>
Date: Tue, 22 Apr 2003 19:11:44 -0700 (PDT)
Yeah, I wish it was as easy as adding the element name
to the cdata-section-elements attr, but the element
name is not unique. There are about 10 <property>
elements and there is only one that needs to be
treated as CDATA (property name="body"). I tried
putting this:

cdata-section-elements="property name='body'"

but it did not work, rightfully so. So, I cannot use
cdata-section-elements. Right now, I am simply doing

<property name="Body">&lt;![CDATA[
<!-- main content -->
<xsl:apply-templates />

but that seems 'unclean' to me...


Date: Tue, 22 Apr 2003 19:57:43 +0100
From: "Michael Kay" <mhk@xxxxxxxxx>
Subject: RE: [xsl] outputting CDATA section

> So, how the heck do I put in those CDATA tags?! I
> cannot use the cdata-sections attr in xsl:output
> because the element name is not unique. There are
> about 10 other <property> elements with differing
> attr values.

cdata-section-elements takes a whitespace-separated
list of element
names, e.g.
cdata-section-elements="a b c d e"

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 

Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo

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

Current Thread