Subject: [xsl] Storing Partial Sums From: Fatih TURKMEN <fatihturkmen99@xxxxxxxxx> Date: Wed, 8 Sep 2004 01:37:34 -0700 (PDT) |
Hi, I am trying to get the sum of all values in a for-each loop. Is it possible to store the partial sums to find the final result? xsl is something like this : <xsl:for-each select ="Documents/Document[@Doc_No=$lastdoc]/People/Person"> <xsl:variable name="person" select="@Person_Id"/> <xsl:variable name="week" select="count(/DocRoot/Documents/Document/People/Person[@Person_Id=$person])"/> <xsl:value-of select="format-number(sum(/DocRoot/Documents/Document/People/Person[@Person_Id=$person]/@Avg) div $week, '##.##')"/> </xsl:for-each> For the above xsl snippet what I am trying to do is to get the sum of all "sum(/DocRoot/Documents/Document/People/Person[@Person_Id=$kisi]/@Avg) div $week " values. I tried to write an XPath expression to find the sum but couldn't success. So I need to store the partial sums to find the result. Any idea? __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] invoking template for oth, David Carlisle | Thread | Re: [xsl] Storing Partial Sums, cking |
RE: [xsl] global find and replace c, Michael Kay | Date | [xsl] testing dates, Peter Flynn |
Month |