|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
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








