<?xml version="1.0" encoding="UTF-8"?>
<items>
<item>
<count>2</count>
<units>10</units>
<value>2.50</value>
</item>
<item>
<count>3</count>
<units>5</units>
<value>3.50</value>
</item>
</items>
I want to calculate the following equation for all of the items.
(value / (count * units) )* count * units
Hence, I create a loop. However is not working with the sum function. Could you please provide me your help with the XSLT 1.0?
<for-each select="items/item">
<xsl:value-of select="sum((//value div (//count * //units)) * (count * units))"
</for-each>