I have to loop through unrounded quantities and for each one I call a function getRoundedValue passing the value to round and the rounding policy parameter dynamically
and summarize all the returned values into one output.
I have somethink like...(reduced code for clarty)
<xsl:for-each select="//lineItems/usageLineItem/lstLineItems....>
<xsl:variable name="paramToRound">
<xsl:value-of select="//lineItems/usageLineItem/lstLineItems..../unRoundedQuantity"/>
</xsl:variable>
<xsl:variable name = "round_policy">
<xsl:value-of select="../../linteItems/subscriptionAttributes[parameter = 'Rounding_Policy']/value"/>
</xsl:variable>
<xsl:value-of select="sum(getRoundedValue($paramToRound,$round_policy))"/>
</xsl:for-each>
Can someone help ? Urgent !!!!!