sum function in BIP
I am trying to sum up the tag value under for loop, but its not giving the desired sum.Have tried below options
1.<?for-each:TsOrderEntry-LineItems?><?SBTSTotalMRCWithVAT?><?end-for-each?>
<?sum(SBTSTotalMRCWithVAT)?>
2.
Decalring the Varible :<?xdoxslt:set_variable($_XDOCTX, 'var', 0)?>
Do the calculation :<?xdoxslt:set_variable($_XDOCTX,'var', xdoxslt:get_variable($_XDOCTX,'var‘)+ SBTSTotalMRCWithVAT)?>
Display the Variable : <?xdoxslt:get_variable($_XDOCTX, 'var')?>
attached is the xml where i need to sum up "SBTSTotalMRCWithVAT" tag value