Subject: RE: [xsl] accessing CDATA from XSL From: "Conal Tuohy" <conalt@xxxxxxxxxxxxxxx> Date: Tue, 24 Dec 2002 10:57:14 +1300 |
> Conal Tuohy wrote: > > <xsl:value-of select="text()"/> will return the text of the > > parent element, without including the text of the <child> > > element. > > The select identifies the node-set consisting of those text > nodes, yes, but using value-of on a node-set will result in > the use of the string-value of just the first node in the > set. Yes I tend to forget the implicit "[1]" in <xsl:value-of>. It seemed to me that Mukund's original example was contrived (e.g. a child called "child") and I was trying to propose a general solution for what I was guessing Mukund might want to do (possibly multiple children, for instance). I guess what I was really trying to say was something like: <xsl:for-each select="text()"><xsl:value-of select="."/></xsl:for-each> or even <xsl:for-each select="text()[normalize-space(.)]"><xsl:value-of select="."/></xsl:for-each> But actually I think the real answer Mukund was looking for was that the CDATA section AS SUCH is not accessible in XSLT ... it's just merged with other text data. Cheers! Con XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] accessing CDATA from XSL, Mike Brown | Thread | Re: [xsl] accessing CDATA from XSL, Mike Brown |
Re: [xsl] accessing CDATA from XSL, Mike Brown | Date | [xsl] regarding unique nodes in a n, Laura |
Month |