[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] accessing CDATA from XSL


Subject: RE: [xsl] accessing CDATA from XSL
From: "Conal Tuohy" <conalt@xxxxxxxxxxxxxxx>
Date: Mon, 23 Dec 2002 20:17:01 +1300

> I have an xml file which has got a CDATA in it for eg:
> <parent>
> <child>.... </child>
> < ! [ CDATA[ hi how r u .....]]>
> </parent>
>
> so from my xsl i want to access the content of the CDATA
> ie .. i how do i do that ie
> <xsl:template match="Parent">
> <xsl:value-of select="."/>
> i want the CDATA value here
> so how do i do that
> mukund

<xsl:value-of select="text()"/> will return the text of the parent element,
without including the text of the <child> element.

In this context <xsl:value-of select="."/> is equivalent to:
<xsl:value-of select=".//text()"/>

Con


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



Current Thread
Keywords