XSL reference documentation generated from the W3C Recommendation 16 November 1999
The
Note: Implementations are not required to use the JDK 1.1 implementation, nor are implementations required to be implemented in Java.
Note: Stylesheets can use other facilities in XPath to control rounding.
<decimal-format>
name = qname
decimal-separator = char
grouping-separator = char
infinity = string
minus-sign = char
NaN = string
percent = char
per-mille = char
zero-digit = char
digit = char
pattern-separator = char
Model: EMPTY
</decimal-format>
The xsl:decimal-format element declares a
decimal-format, which controls the interpretation of a format pattern
used by the name attribute, then the element declares a named
decimal-format; otherwise, it declares the default decimal-format.
The value of the name attribute is a QName, which is expanded as described
in qname. It is an error to declare either the
default decimal-format or a decimal-format with a given name more than
once (even with different
The other attributes on xsl:decimal-format correspond
to the methods on the JDK 1.1 get/set method pair there is an attribute
defined for the xsl:decimal-format element.
The following attributes both control the interpretation of characters in the format pattern and specify characters that may appear in the result of formatting the number:
decimal-separator specifies the character used
for the decimal sign; the default value is the period character
(.)
grouping-separator specifies the character used
as a grouping (e.g. thousands) separator; the default value is the
comma character (,)
percent specifies the character used as a
percent sign; the default value is the percent character
(%)
per-mille specifies the character used as a per
mille sign; the default value is the Unicode per-mille character
(#x2030)
zero-digit specifies the character used as the
digit zero; the default value is the digit zero
(0)
The following attributes control the interpretation of characters in the format pattern:
digit specifies the character used for a digit
in the format pattern; the default value is the number sign character
(#)
pattern-separator specifies the character used
to separate positive and negative sub patterns in a pattern; the
default value is the semi-colon character (;)
The following attributes specify characters or strings that may appear in the result of formatting the number:
infinity specifies the string used to represent
infinity; the default value is the string
Infinity
NaN specifies the string used to represent the
NaN value; the default value is the string NaN
minus-sign specifies the character used as the
default minus sign; the default value is the hyphen-minus character
(-, #x2D)