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

How to access calculation done in loop?

Subject: How to access calculation done in loop?
From: Niloy Chakrabarty <tukaic@xxxxxxx>
Date: 1 Feb 2001 15:08:06 MST
niloy chakrabarty
Hi, 

I am trying to calculate the total price of all the items purchased. Take for
example the code below:

<xsl:for-each select="//box/item">
  <xsl:value-of select="./price"/>
  <xsl:value-of select="./qty"/>
</xsl:for-each>

I want to print the total amount outside the for-each loop by multiplying
price and qty for each item. Is there a way to achieve this?

TIA 

Niloy

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.