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

selecting multiple elements

Subject: selecting multiple elements
From: Christopher Hansen <chansen1@xxxxxxxxx>
Date: Mon, 6 Dec 2004 12:56:50 -0500
select multiple
I am working with an XML file similar to the one below, consisting of
many transactions.  I'm trying to extract the items that each customer
has bought, and generate an email which includes all these items
within the body of the mail.

The email is working, however, I can only send 4 separate emails (one
for each item) with the item in the body.

java function for email is like this:
send(string to, string from, string subject, string msg)

Right now its just passing in the item into the $msg variable one at a
time.  Can anyone reccommend a way to insert these 4 items into the
$msg variable so i can send one mail w/ all 4 items included?


 <t>
   <transaction>
     <customer>
  <name>Daniel B.</name> 
  <email>chansen1@xxxxxxxxx</email> 
     </customer>
  <items total="$11.78">
    <item>Milk</item> 
     <item>Butter</item> 
     <item>SuperPretzel</item> 
     <item>Paper Towels (Scott's)</item> 
  </items>
 </transaction>
  ...



<xsl:for-each select="$transactions/transactions//transaction/items/item" >
  <xsl:variable name="thePerson" select="../../customer/name"/>
   <xsl:variable name="email" select="../../customer/email"/>
   <xsl:variable name="msg" select=???'/>

   <xsl:value-of
select="myJava:myMail.send($email,'test@xxxxxx,'Coupon!', $msg)" />

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.