xsl-list
[Top] [All Lists]

Re: multiple node values not being returned

2005-05-20 04:21:51


David Carlisle wrote:

Instead only the first  A/Value term is being returned.


As stated in a reply to a different one of your threads the other day:


http://www.biglist.com/lists/xsl-list/archives/200505/msg00453.html

  but value-of always returns the string value of one node (ignoring all
  but the first node in document order)

Had a look at the post.

Ok so as you stated earlier in another post each node is considered different even if it is named the same. So value-of recognises the first occurrence of A/Value and returns it. But what if I want all the . in <Value> nodes of a particular parent node to be returned.

I know I can get all the A/Value with the following code

<xsl:for-each select="$interim/A/Value">
         <TestVal>Value text: <xsl:value-of select="."/></TestVal>
</xsl:for-each>

Is there a one line code available to do the same thing?

Thanks
Rahil


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--