I looking to add a total (Sum) on the bottom of a table column with numbers. I can do this by using the XSLT 1.0 option mentioned in Aggregate-function for sum and product in XPath
However, I could also parse the XML source first in Java (it's part of a TeamSite install, which uses Java & XSLT 1.0) and add the sum there. Does anybody know how the efficiency of both solutions compare?
Note: the Java code does not parse the XML source already, so there is no efficiency to be gained.
Update
I made both solutions, and the Java solution seems to be a bit faster. However: I don't have exact metrics and I don't have a big example data set. I'm going to use the Java solution, mainly because of re-usability (i.e. using sub totals and grand totals) and the caching options that are available in Java.