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

Multiple groupings

Subject: Multiple groupings
From: "Kenny Akridge" <kenny@xxxxxxxxxxxxxxxxx>
Date: Tue, 27 Apr 2004 00:13:24 -0400
multiple groupings
I've looked at the FAQs, but have had a hard time making any certain methods
work.  I basically have XML that has a PaymentType, City, Date and ID.  I
need to group all records by PaymentType then by City.  I need to total by
city and by Payment type.  Here is some sample XML.

<?xml version="1.0" encoding="UTF-16"?>
<ArrayOfAccountLineItems>
	<AccountLineItem>
		<ID>12993</ID>
		<PaymentType>Credit Card</PaymentType>
		<SettleDate>2004-04-14T22:57:46.6230000-04:00</SettleDate>
		<CityName>Las Vegas</CityName>
	</AccountLineItem>
	<AccountLineItem>
		<ID>12992</ID>
		<PaymentType>Cash</PaymentType>
		<SettleDate>2004-04-14T22:57:46.6230000-04:00</SettleDate>
		<CityName>New York</CityName>
	</AccountLineItem>
	<AccountLineItem>
		<ID>12963</ID>
		<PaymentType>Check</PaymentType>
		<SettleDate>2004-04-14T22:57:51.3100000-04:00</SettleDate>
		<CityName>Orlando</CityName>
	</AccountLineItem>
	<AccountLineItem>
		<ID>12962</ID>
		<PaymentType>Check</PaymentType>
		<SettleDate>2004-04-14T22:57:51.3100000-04:00</SettleDate>
		<CityName>New York</CityName>
	</AccountLineItem>
	<AccountLineItem>
		<ID>12969</ID>
		<PaymentType>Credit Card</PaymentType>
		<SettleDate>2004-04-14T22:57:51.4830000-04:00</SettleDate>
		<CityName>Las Vegas</CityName>
	</AccountLineItem>
	<AccountLineItem>
		<ID>12968</ID>
		<PaymentType>Voucher</PaymentType>
		<SettleDate>2004-04-14T22:57:51.4830000-04:00</SettleDate>
		<CityName>Orlando</CityName>
	</AccountLineItem>
	<AccountLineItem>
		<ID>12975</ID>
		<PaymentType>Check</PaymentType>
		<SettleDate>2004-04-14T22:57:51.6400000-04:00</SettleDate>
		<CityName>Las Vegas</CityName>
	</AccountLineItem>
	<AccountLineItem>
		<ID>12974</ID>
		<PaymentType>Check</PaymentType>
		<SettleDate>2004-04-14T22:57:51.6400000-04:00</SettleDate>
		<CityName>Orlando</CityName>
	</AccountLineItem>
	<AccountLineItem>
		<ID>12981</ID>
		<PaymentType>Voucher</PaymentType>
		<SettleDate>2004-04-14T22:57:51.8100000-04:00</SettleDate>
		<CityName>New York</CityName>
	</AccountLineItem>
	<AccountLineItem>
		<ID>12980</ID>
		<PaymentType>Cash</PaymentType>
		<SettleDate>2004-04-14T22:57:51.8100000-04:00</SettleDate>
		<CityName>Orlando</CityName>
	</AccountLineItem>
</ArrayOfAccountLineItems>

II have been trying the for-each PaymentType[not(. =
preceding::PaymentType)] approach.

Any thoughts on the best way to tackle this?

Thanks.

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.