G
Gadrin77
I can create a list of unique items and display them, but
I'd like to place a sum of their @Value after each item.
MS XML 4 SP2 and using XSL (using the Meunchian method).
XML looks like:
<Bonus>
<BonusItem Name="Category One" Value="1"/>
<BonusItem Name="Category One" Value="1"/>
<BonusItem Name="Category Two" Value="2"/>
<BonusItem Name="Category One" Value="1"/>
<BonusItem Name="Category Two" Value="2"/>
<BonusItem Name="Category Six" Value="6"/>
</Bonus>
and the output should look like:
Category One: 3
Category Two: 4
Category Six: 6
I've tried sum(@Value) inside a for-each but it doesn't give
me the total.
Thanks for your help.
I'd like to place a sum of their @Value after each item.
MS XML 4 SP2 and using XSL (using the Meunchian method).
XML looks like:
<Bonus>
<BonusItem Name="Category One" Value="1"/>
<BonusItem Name="Category One" Value="1"/>
<BonusItem Name="Category Two" Value="2"/>
<BonusItem Name="Category One" Value="1"/>
<BonusItem Name="Category Two" Value="2"/>
<BonusItem Name="Category Six" Value="6"/>
</Bonus>
and the output should look like:
Category One: 3
Category Two: 4
Category Six: 6
I've tried sum(@Value) inside a for-each but it doesn't give
me the total.
Thanks for your help.