XSLT to merge nodes and sum value of tags



I'm quite new to xlst, and I need help to create an xslt to transform my xml in a resulting one. Here's my issue: I have an xml like this: ......... 1 O/FREIGHT 100 2 O/FREIGHT 130 3 BAF 10 4 O/FREIGHT 34 ...... ...... ......


Now my problem is to sum all sequence list having same service_id cost values and result in a single tag for each group, containing the cost value. In example given the expected xml result should be:


......... 1 O/FREIGHT 264 3 BAF 10 .......... ...... ......


All should be recursive to "merge" all service tags and keep the remaining part of the xml as is.


Thanks in advance for any help :)


No comments:

Post a Comment