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

RE: Storing Partial Sums

Subject: RE: Storing Partial Sums
From: Pieter Reint Siegers Kort <pieter.siegers@xxxxxxxxxxx>
Date: Wed, 8 Sep 2004 11:07:17 -0500
partial sum
Hi Fatih,

This may help you solve your problem:
http://www.xslt.com/html/xsl-list/2002-04/msg00539.html

(you'll need to view the whole thread from beginning to end to understand
what Jenni explains there)

HTH,
<prs/> 

-----Original Message-----
From: Fatih TURKMEN [mailto:fatihturkmen99@xxxxxxxxx] 
Sent: Wednesday, September 08, 2004 3:38 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Storing Partial Sums 

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

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.