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

Conditional Summation

Subject: Conditional Summation
From: "Katie McNally" <kmcnally9@xxxxxxxxxxx>
Date: Wed, 01 Aug 2001 09:40:22 -0500
conditional summation
I am transforming XML to HTML. I am trying to sum up values. I need to display two totals. The first total is the Total Assets (amounts) for the primary borrower (Rank = 1). The second total is the Total Assets (amounts) for the secondary borrower (Rank = 2). What should my xsl look like in order to sum up the "Amount" values for the borrower with Rank = 1? (The same question would apply to summing the "Amount" values for borrower with Rank = 2).

I want to display:

Kelly Smith
Total Assets:  $1100

John Smith
Total Assets:  $400

A simplified version of my xml is:

<Loan>
<Borrower>
	<FirstName>Kelly</FirstName>
	<LastName>Smith</LastName>
	<Rank>1</Rank>
	<AssetSet>
		<Asset>
			<Amount>500</Amount>
		</Asset>
		<Asset>
			<Amount>600</Amount>
		</Asset>
	</AssetSet>
</Borrower>
<Borrower>
	<FirstName>John</FirstName>
	<LastName>Smith</LastName>
	<Rank>2</Rank>
	<AssetSet>
		<Asset>
			<Amount>100</Amount>
		</Asset>
		<Asset>
			<Amount>300</Amount>
		</Asset>
	</AssetSet>
</Borrower>
</Loan>

Thanks,
Katie


_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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.