Subject: RE: [xsl] summing up incrementally From: cknell@xxxxxxxxxx Date: Thu, 18 Dec 2003 13:41:32 -0500 |
Where's the summing? Please tell us your method of computing the values to be placed in the output tree element's "percentage-increase" attributes. -- Charles Knell cknell@xxxxxxxxxx - email -----Original Message----- From: Paul Tremblay <phthenry@xxxxxxxxxxxxx> Sent: Thu, 18 Dec 2003 13:03:52 -0500 To: xsl-list <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: [xsl] summing up incrementally Is there a way to sum up incrementally? My source tree looks something like this: <root> <year year = "1937"> <month month = "January" percentage-increase = "105"/> <!--and so on for each month--> <month month = "December" percentage-increase = "103"/> </year> <year year = "1938"> <month month = "January" percentage-increase = "104"/> <!--and so on for each month--> <month month = "December" percentage-increase = "102"/> </year> <year year = "1939"> <month month = "January" percentage-increase = "106"/> <!--and so on for each month--> <month month = "December" percentage-increase = "108"/> </year> </root> I need to sum up the percentage-increase just for December. I want my resulting tree to look like this: <root> <year year = "1937" percentage-increase = "103"/> <!--now add up Decmber 1937 and December 1938--> <year year = "1938" percentage-increase = "105"/> <!--now add up Decmber 1937, December 1938, and December 1939--> <year year = "1938" percentage-increase = "113"/> </root> I'm thinking I can do with is a recursive template, but can't figure out how. Thanks Paul -- ************************ *Paul Tremblay * *phthenry@xxxxxxxxxxxxx* ************************ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] summing up incrementally, Paul Tremblay | Thread | Re: [xsl] summing up incrementally, Paul Tremblay |
[xsl] summing up incrementally, Paul Tremblay | Date | RE: [xsl] Re: pretty-printing XML i, Lars Huttar |
Month |