Similar to this question (http://stackoverflow.com/q/1333558/948404) I want to use XPath to calculate a sum over products in a structure like this:
Try this: