This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Conditional Summation


> What should my xsl look like in 
> order to sum up the "Amount" values for the borrower with Rank = 1?

with Loan as the context node:
sum(Borrower[Rank=1]/AssetSet/Asset/Amount)

Mike Kay
Software AG
  
> 
> 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
> 

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]