cdias
October 30th, 2003, 03:35 PM
I have the following output from the XML below:
[xml]
<row>
<sum_total_octets_sec_pct>1311147.01346801346801346801346801346801</sum_total_octets_sec_pct>
</row>
<row>
<sum_total_octets_sec_pct>1214770.05218855218855218855218855218855</sum_total_octets_sec_pct>
</row>
....
[xsl applied]
<xsl:for-each select="*">
<xsl:variable name="currname" select="name()"/>
<xsl:variable name="currvalue" select="."/>
<xsl:variable name="rest" select ="$currvalue - sum(/report//row[position() <= $topNPlus]/*[name() = $currname])"/>
<xsl:call-template name="restante">
<xsl:with-param name="colname" select="$currname"/>
<!--
<xsl:with-param name="value" select="$rest"/>
-->
<xsl:with-param name="value" select="sum(/report//row[position() <= $topNPlus]/*[name() = $currname])"/>
</xsl:call-template>
</xsl:for-each>
The result of the operation select="sum(/report//row[position() <= $topNPlus]/*[name() = $currname]) is a negative number. I was waiting for a positive number!!!
Can anybody tell me what's going on?!
Thanks in advance,
Carlos Dias
[xml]
<row>
<sum_total_octets_sec_pct>1311147.01346801346801346801346801346801</sum_total_octets_sec_pct>
</row>
<row>
<sum_total_octets_sec_pct>1214770.05218855218855218855218855218855</sum_total_octets_sec_pct>
</row>
....
[xsl applied]
<xsl:for-each select="*">
<xsl:variable name="currname" select="name()"/>
<xsl:variable name="currvalue" select="."/>
<xsl:variable name="rest" select ="$currvalue - sum(/report//row[position() <= $topNPlus]/*[name() = $currname])"/>
<xsl:call-template name="restante">
<xsl:with-param name="colname" select="$currname"/>
<!--
<xsl:with-param name="value" select="$rest"/>
-->
<xsl:with-param name="value" select="sum(/report//row[position() <= $topNPlus]/*[name() = $currname])"/>
</xsl:call-template>
</xsl:for-each>
The result of the operation select="sum(/report//row[position() <= $topNPlus]/*[name() = $currname]) is a negative number. I was waiting for a positive number!!!
Can anybody tell me what's going on?!
Thanks in advance,
Carlos Dias