Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to apply SUM on values returned by a template function

FofanaNov 8 2018 — edited Nov 27 2018

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 !!!!!

Comments
Post Details
Added on Nov 8 2018
2 comments
1,994 views