sum Function (XPath)
Returns the sum of all nodes in the node-set. Each node is first converted to a number value before summing.
This example demonstrates the XPath expression
sum(//a). It returns 6, which is the sum of the numbers in
XML File (as.xml)
XSLT File (sum.xsl)