Sugandh Jain wrote:
> I have a XSLT file to mapped to commissions field. it's multiplied with say
> 0.01 (as shown).
> The xslt returns the number with 20 decimal digits. What do I add to the xsl
> to round of the result to 4 decimal places.
> Commision is a double type field in c#.
> <xsl:for-each select="Commission">
> <xsl:value-of select=".*0.01"/>
Use format-number <http://www.w3.org/TR/xslt#format-number>:
<xsl:value-of select="format-number(. * 0.01, '0.0000')"/>
Martin Honnen --- MVP XML