[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] generating totals
I have a rather large xml and I am trying to calculate some totals. I have to go through the whole file once listing the information for each client... then after i have been though the file, I need to print the totals... If I were using a different language, i would just keep up with the totals so far in a variable.. but the only way I have come up with doing it in xsl is going through the file, then at the end, doing a sum of the values i need to add... This would be ok, but the file is so large, it takes a long time for it to go through the file again.. Anyone have any suggestions? XML Layout <client> <name /> <phone /> <price /> </client> Pseudo-XSL (current) <for-each client> print name, phone, price </for-each> total = <value-of sum(//client/price)> my xml file is a great deal more involved than I have listed, but I think my example explains my situation correctly. Pseudo-XSL (desired) <for-each client> print name, phone, price <remember total so far???> </for-each> print total Thanks for any help!!! 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
|