Re: [xsl] selecting multiple elements

Subject: Re: [xsl] selecting multiple elements
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 7 Dec 2004 10:09:20 GMT
> I cant get more than one item into each email.  It sends one email per
> item right now.

well you are iterating over the items one at a time:

        <xsl:for-each select="$transactions//transaction/items/item" >

If you don't want to do that, do as I suggested in my last reply

just iterate over the items elements

        <xsl:for-each select="$transactions//transaction/items" >

Then you can select all the items in one go    


<xsl:variable name="item" select="item" />

$item will then be a node set of all the items below that <items>
element.

What the extension function myJava:myMail.send( does when passed a node
set depends entirely on the definition of that function (I have know
idea) note though that an XSLt string function (such as string() or
concat() if given a node set would discard all but the first node and
give the string value of the first node only.
If this extension function is doing that you may want to concatenate the
node sets into a variable first, ie use

<xsl:variable name="item">
  <xsl:copy-of select="item"/>
</xsl:variable

instead of the above definition. $item will then be a result tree
fragment and its string value will be the concatenation of teh items.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread