Re: [xsl] grouping and sum

Subject: Re: [xsl] grouping and sum
From: dmitrik@xxxxxxxxxxxxxx
Date: Mon, 6 Dec 2004 11:12:49 -0500 (GMT-05:00)
Is it possible to group the whole xml document by the Customers node without hardcoding a specific customer?
and at the same time also use the following date comparison. This code below is inside a for loop which 
lists every <Trade> , so no grouping is introduced.  One section of the xml is listed, but there can be
many Customers and Trade nodes

<xsl:value-of select="format-number(sum(Trade/Step

   /StepCharge_TTBlack), '###,###,##0')"/>


structure of xml



-----Original Message-----
From: David Carlisle <davidc@xxxxxxxxx>
Sent: Dec 6, 2004 9:42 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] grouping and sum

> how is it possible to group by the Customer Node to retrieve a sum from StepCharge?

the sum of all StepCharge for customer AAA is

<xsl:value-of select="sum(Trade[Customer='AAA']/StepCharge)"/>


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

Current Thread