[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: accessing CDATA from XSL
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|