This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: concat selected text nodes
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] concat selected text nodes
- From: David Tolpin <dvd at power dot renderx dot com>
- Date: Fri, 20 Apr 2001 11:15:53 -0700 (PDT)
- Cc: grig at renderx dot com
- Reply-To: xsl-list at lists dot mulberrytech dot com
>
> 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.
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list