http://onionworks.net/2004/renderengine/utility
formatNumber (number : double, format : string, [culture : string]) : string
The method “formatNumber” converts a number into another format. The starting number is transferred by the parameter “number”, whilst “format” describes the desired output format. “culture” describes the usual date format of a country (e.g. “de”, “at” or “en”).
<xsl:value-of select="util:formatNumber(235235123.234, 'c', 'de')" />
<xsl:value-of select="util:formatNumber(235235123.234, '0.00')" />
Conversion of a number into another format
In the example, the number is converted into another format. The parameter “c” indicates here that the number is output as a currency. The kind of currency (euro in this case) is determined by the parameter 'de'.
Output: 235.235.123,23 €
In the second example, only one format is defined. For the representation, the country setting of the server is reverted to.
Output: 235235123,23