This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
How to access calculation done in loop?
- To: XSL-List at lists dot mulberrytech dot com
- Subject: [xsl] How to access calculation done in loop?
- From: Niloy Chakrabarty <tukaic at usa dot net>
- Date: 1 Feb 2001 15:08:06 MST
- Reply-To: xsl-list at lists dot mulberrytech dot com
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