|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: getting text nodes of subtree?
Hi Jarkko, > This one nearly does it. [snip] > <xsl:value-of select = "//a" > > <xsl:value-of select = "text()" /> > </xsl:value-of> > > <xsl:value-of select = "a/child::*"> > <xsl:value-of select = "text()" /> > </xsl:value-of> > > <xsl:value-of select = "b/child::*"> > <xsl:value-of select = "text()" /> > </xsl:value-of> Really? It should give you an error -- you're not allowed to have xsl:value-of elements inside other xsl:value-of elements. Perhaps you're using xsl:for-each instead? In that case, you'd get the value of the first text node child of each of the a elements in the document, followed by the first text node child of each of the elements that are children of the 'a' document element, followed by the first text node child of each of the elements that are children of the 'b' document element. (The reason you get only the *first* text node child of the element is that xsl:value-of picks the first node from the node set you select with its select attribute, and gives the string value of that.) Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ 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
|






