But now I want to also print the sum of this value ie I want to get the output of :
29530+32088.12-125698+10247500-3556593
(from the above xml)
The problem here is sum as far as my knowledge is concerned only takes nodes as parameter.Please help me out with the solution of this problem.
Thanx in advance.
Rahul.
Subject:Sum of specific values in delimited list Author:Tony Lavinio Date:23 Jan 2006 02:54 PM
There are several ways to solve this. Probably the crudest is to
turn it into a problem of recursion instead of iteration, like the
attached.
There are more elegant methods that work better for larger input
sets. The divide-and-conquer approach, where you keep bisecting
the data, is relatively efficient.
There's a book called 'XSLT Cookbook' by Sal Mangano that has lots
of useful recipes for problems like this.