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

questions. (urgent)

Subject: questions. (urgent)
From: "Kelvin Law" <kelvin.law@xxxxxxxxxxx>
Date: Thu, 29 May 2003 18:34:05 -0400
kelvin law
Hi,
	I would hope someone can point me into the right direction doing this. It
has been 5 hours and I still haven't figured out how to do this.
My xml is similar to this:
<persons>
	<group>A</group>
	<person>
		<name>Bob</name>
		<amount>10.00</amount>
		<date>05/13/2003</date>
		<paymentType>CASH</paymentType>
	</person>
	<person>
		<name>Ada</name>
		<amount>20.00</amount>
		<date>05/10/2003</date>
		<paymentType>DEBIT CARD</paymentType>
	</person>
	<person>
		<name>David</name>
		<amount>15.00</amount>
		<date>05/13/2003</date>
		<paymentType>CASH</paymentType>
	</person>
	<person>
		<name>Kenny</name>
		<amount>20.00</amount>
		<date>05/13/2003</date>
		<paymentType>CHEQUE</paymentType>
	</person>
</persons>
<persons>
	<group>B</group>
	...
</persons>

I want an xsl which can produce something as follow:

05/10/2003
	DEBIT CARD
			Ada			20.00
	TOTAL FOR DEBIT CARD		20.00(*)
TOTAL FOR 05/10/2003			20.00(*)

05/13/2003
	CASH
			Bob			10.00
			David			15.00
	TOTAL FOR CASH			25.00(*)

	CHEQUE
			Kenny			20.00
	TOTAL FOR CHEQUE			20.00(*)
TOTAL FOR 05/13/2003			45.00(*)

TOTAL FOR GROUP A				65.00(*)
....

TOTAL FOR ALL GROUP 			sum of all group(*)


I have already got the grouping working correctly with a solution derived
from:
	http://www.dpawson.co.uk/xsl/sect2/N4486.html#d4085e391

However, I can't get the TOTAL working.
Can someone please share some light on how I can get the total (the one with
(*)) using XSLT?

Any help would be appreciated. Thank you.


Kelvin

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.478 / Virus Database: 275 - Release Date: 5/6/2003


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.