cancel
Showing results for 
Search instead for 
Did you mean: 

[CPI]: Simple Multiplication in XSLT Mapping

babruvahana
Contributor
0 Kudos

Hi Experts,

I am facing a strange issue in XSLT mapping which works fine with my testing in visual studio. But, the same is giving a different result in the Integration Suite simulation/Iflow run.

The requirement is to multiply the source volume value by 1000. PFB below details:

Mapping:

Source Field Value:

Expected Output after mapping: 22770000

Integration Suite Output: 2.277E7

Any suggestions or leads will be really helpful.

Regards,

Pavan

View Entire Topic
yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos

babruvahana

sample code for your problem to solve

<xsl:template match="/">
    <ns0:MULTIPLICATION>
        <Result>
            <xsl:value-of select="/*/*/*[1] * /*/*/*[2]"/>
        </Result>
    </ns0:MULTIPLICATION>
</xsl:template>


babruvahana
Contributor
0 Kudos

Hi yoganandamuthaiah,

What does "/*/*/*[1] * /*/*/*[2]" mean? I think I’m already doing the same in my XSLT.

Regards,

Pavan

robertfels
Participant
0 Kudos

This XPath expression selects the first and second child elements of the root element of the input document, multiplies them, and returns the result as the value of the Result element.

<root>
  <num1>5</num1>
  <num2>10</num2>
</root>
<ns0:MULTIPLICATION>
<Result>50</Result>
</ns0:MULTIPLICATION>