xsl-list
[Top] [All Lists]

Re: CDATA output

2003-04-22 19:11:44
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
this:

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

but that seems 'unclean' to me...

--Nathan


Date: Tue, 22 Apr 2003 19:57:43 +0100
From: "Michael Kay" <mhk(_at_)mhk(_dot_)me(_dot_)uk>
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
name
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(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com 



__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com

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



<Prev in Thread] Current Thread [Next in Thread>