EDN Admin
Well-known member
Hi, i have an xml where i there is a field that i have to sum, the problem is that when using:
<xsl:value-of select="sum(//activity[contains(sponsors/sponsor/sponsor-name,ITALY MAE)] /sponsors/sponsor/amount)" /> the sum is not complete.
I tried to sum the values but i cant sum them
<xsl:variable name="totalItalyMae" /><br/>
<xsl:for-each select="//sponsors/sponsor
<br/>
<xsl:if test="contains(sponsor-name,ITALY MAE) <br/>
<xsl:variable name="PartialItalyMae" select= "amount" /><br/>
</xsl:if>
<br/>
</xsl:for-each>
with this cycle i can get the right values but i cant sum them because totalItalyMae doesnt change when i add values.
Is there any way to sum this values.
Thank you.
View the full article
<xsl:value-of select="sum(//activity[contains(sponsors/sponsor/sponsor-name,ITALY MAE)] /sponsors/sponsor/amount)" /> the sum is not complete.
I tried to sum the values but i cant sum them
<xsl:variable name="totalItalyMae" /><br/>
<xsl:for-each select="//sponsors/sponsor
<br/>
<xsl:if test="contains(sponsor-name,ITALY MAE) <br/>
<xsl:variable name="PartialItalyMae" select= "amount" /><br/>
</xsl:if>
<br/>
</xsl:for-each>
with this cycle i can get the right values but i cant sum them because totalItalyMae doesnt change when i add values.
Is there any way to sum this values.
Thank you.
View the full article