This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
sum for a specific attribute
Hello friends,
Is there a way to get the sum of elements with a condition on the attribure
.
In my case, I need to get the sum of the detail/@value where the
detail/@type is 'A'
and the sum of the detail/@value where the detail/@type is 'C' .
<account>
<detail type="A" value="123.56" />
<detail type="A" value="456.78" />
<detail type="A" value="12.3" />
<detail type="B" value="42.3" />
<detail type="B" value="96.2" />
<detail type="C" value="14.5" />
<detail type="C" value="22.3" />
<detail type="C" value="17.1" />
<detail type="C" value="98.6" />
</account>
Please help
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list