|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Conditional Summation
Hi Katie, > I am also trying to add up Fee values based on the Fee's Code. If the Code > for a fee is not "Taxes", "Insurance" or "Other" the fee Amount should not > be included in the sum for the Total. context node is FeeSet: sum(Fee[Code[.='Taxes' or .='Insurance' or .='Other']]/Amount) reads: sum all the Amounts which are a child of a Fee that has a Code child whose string-value is either 'Taxes', 'Insurance', or 'Other'. > A simplified version of my xml is: > > <Loan> > <FeeSet> > <Fee> > <Code>Taxes</Taxes> Assuming you meant <Code>Taxes</Code> > <Amount>300.0</Amount> > </Fee> > <Fee> > <Code>Appraisal</Taxes> > <Amount>700.0</Amount> > </Fee> > <Fee> > <Code>Other</Taxes> > <Amount>200.0</Amount> > </Fee> > <Fee> > <Code>Insurance</Taxes> > <Amount>400.0</Amount> > </Fee> > </FeeSet> > </Loan> Cheers, Oliver /-------------------------------------------------------------------\ | ob|do Dipl.Inf. Oliver Becker | | --+-- E-Mail: obecker@xxxxxxxxxxxxxxxxxxxxxxx | | op|qo WWW: http://www.informatik.hu-berlin.de/~obecker | \-------------------------------------------------------------------/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








