TOC PREV NEXT INDEX

Netscape and XSLT


format-number()

The format-number() function takes a number and formats it as a string.

Syntax:
string format-number(number, string, string[optional]) 
Arguments:
The number to be formatted and a string representing the desired format pattern are required. A third, optional argument, is the name (specified by an <xsl:decimal-format> element) of a decimal format. If there is no third argument, the default decimal format is used.
The second string uses a number of special characters:
# a digit will appear here unless it is a redundant zero.
0 a digit will always appear here.
. the decimal point.
- the minus sign.
, the grouping separator.
; separates the positive and negative format patterns.
% shows the number as a percentage.
\u2030 shows the number as a per-mille.
Result:
The number, formatted as specified in the second argument.
Defined: XSLT, section 12.3.
NS support: Supported as of 7.0.

Comments? devdoc-feedback@netscape.com
TOC PREV NEXT INDEX