[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: selecting multiple elements

Subject: Re: selecting multiple elements
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 7 Dec 2004 10:09:20 GMT
xsl combine multiple elements
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.