This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

How to access calculation done in loop?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]