|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: summing up incrementally
> > WOOPS! > > Of course, 103 + 102 + 108 = 313! > > Okay, I need to minus the 100: > > 1938 = 03 + 02 = 05 > > 1939 = 03 + 02 + 08 = 13 > Your maths is not your strong point - have you never heard of compound interest? You actually need the product 1.03 * 1.02 * 1.08. The way to get that in XSLT is a recursive template. Pass the list of values and the starting value (1) as a parameter, the template then multiplies the supplied value (1) with the first value in the list (1.03) and passes this as a parameter in a recursive call to process the remaining items in the list. Michael Kay 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








