i have a code like this in XSLT 1.0:
<xsl:value-of select="sum(//section1[(field1 = $field1) and (field2 = $field2) and (field3 = $field3))]/Amount/text())"/>
i receive field 'Amount' with double quotes, like this "456.89".
Then when i sum it i got NaN. How can i remove double quotes or ignore them during sum function?
Please remember that solution should be in XSLT 1.0.
I already tried with translate:
<xsl:value-of select="sum(//translate(section1[(field1 = $field1) and (field2 = $field2) and (field3 = $field3))]/Amount/text(), '"', ''))"/>
, but it doesn't work.
Here is sample which i receive:
<root>
<section1>
<field1>1</field1>
<field2>2</field2>
<field3>3</field3>
</section1>
<section1>
<Amount>"10.05"</Amount>
<field1>1</field1>
<field2>2</field2>
<field3>3</field3>
<Amount>"15.10"</Amount>
</section1>
<section1>
<field1>4</field1>
<field2>5</field2>
<field3>5</field3>
<Amount>"10"</Amount>
</section1>
</section1>
</root>
Thank you in advance.