|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: concat selected text nodes
David, your code just returns "This is a" - nothing mroe. You code and my best effort is blw; <xsl:template match="item">
<xsl:variable name="x">
<xsl:value-of select="text()|ver[@id=$ver]"/>
</xsl:variable>
<xsl:value-of select="$x"/><br/><br/><xsl:for-each select="//text()[parent::*/@id='1' or not(parent::*/@id)]"> |<xsl:value-of select="."/>|<br/> </xsl:for-each> </xsl:template> XML: <item>This is a<ver id="0">n old</ver> <ver id="1">new</ver> sentance.</item> Produces: This is a <- David |This is a| <- |new| <- my best so far | sentance.| <- How can I concatenate my three pieces? "This is a new sentance." Having trouble doing it with string() which should concat.
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
|

Cart








