Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XSLT: concatenating selected text nodes

Reply
Thread Tools

XSLT: concatenating selected text nodes

 
 
Andy Fish
Guest
Posts: n/a
 
      01-10-2005
in XSLT, if I want to concatenate _all_ the child text nodes, I can just do

<xsl:value-of select=".">

however, if I want to select and concatente only _some_ of the text nodes.
for instance

<xsl:value-of select=".//foo/text()">

this doesn't work as it just takes the first element in the node set. Is
there any way of achieving this without using <xsl:for-each> to explicitly
loop round them all?

TIA

Andy



 
Reply With Quote
 
 
 
 
David Carlisle
Guest
Posts: n/a
 
      01-10-2005

use copy-of not value-of


David
 
Reply With Quote
 
 
 
 
Andy Fish
Guest
Posts: n/a
 
      01-10-2005

"David Carlisle" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> use copy-of not value-of
>


worked a treat - thanks david.

>
> David



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why treat text nodes as nodes? Xamle Eng XML 8 05-28-2005 01:11 PM
Text nodes and element nodes query asd Java 3 05-23-2005 10:01 AM
Looking A Nodes From Within Nodes Johnny Ooi XML 10 11-14-2004 06:55 PM
selecting nodes between other nodes Timo Nentwig XML 1 06-17-2004 04:54 AM
Reality check: Is it sensible to link XML nodes to other XML nodes in the same file? gavnosis XML 0 08-02-2003 08:22 AM



Advertisments