[xsl] How to access calculation done in loop?

Subject: [xsl] How to access calculation done in loop?
From: Niloy Chakrabarty <tukaic@xxxxxxx>
Date: 1 Feb 2001 15:08:06 MST

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"/>

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?



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