Numeric Templates
<xsl:template name="currencyValue">
<xsl:param name="Number" />
<xsl:value-of select="format-number($Number,'#,###,##0.00')" />
</xsl:template>
<xsl:template name="integerValue">
<xsl:param name="Number" />
<xsl:value-of select="format-number($Number,'####0')" />
</xsl:template>
For invoke them
...The ouput
<xsl:variable name="totalRows" select ="count(reg/amount)" />
<xsl:variable name="totalCustomer" select ="sum(reg/amount)" />
...
<xsl:call-template name="currencyValue">
<xsl:with-param name="Number" select="$totalCustomer" />
</xsl:call-template>
...
<xsl:call-template name="integerValue">
<xsl:with-param name="Number" select="$totalRows" />
</xsl:call-template>
...
2,333.01
561
No comments:
Post a Comment