Re: sum up values of all entities in XSLT
Saturday, October 28, 2006 11:10 AM
Doing that purely in xslt is entirely possible, but is generally not straightforward, so I will not be taking the time to code a working stylesheet. I've generally attacked that kind of thing via a recursion (which presents its own problems for very large xml data sets). On the other hand, just writing a simple xslt file to create a text file with one value on each line and then use a simple program to add the values on the lines. This'll be easier than pure xslt. Heck, given the relative simplicity of your xml file, just write java code that reads xml itself ... SAX-based might be very simple here.