xsl:decimal-format Element
A version of this page is also available for
4/8/2010
Declares a decimal-format, which controls the interpretation of a format pattern used by the format-number function. If there is a 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 Qualified Name (qualified name). 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 import precedence), unless it is declared every time with the same value for all attributes (taking into account any default values).
Syntax
<xsl: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 />
Attributes
- name
[optional] The name of the decimal format. If there is a 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 qualified name. It is an error to declare either the default decimal-format or a decimal-format with a given name more than once unless it is declared every time with the same value for all attributes (taking into account any default values).
- decimal-separator
[optional] The character used to separate the integer and the fraction part of a number. The default is ".".
- grouping-separator
[optional] The character used to separate groups of digits. The default is ",".
- infinity
[optional] The string used to represent infinity; the default value is the string Infinity.
- minus-sign
[optional] The character used as the default minus sign; the default value is the hyphen-minus character (-, #x2D).
- NaN
[optional] The string used to represent the NaN value; the default value is the string NaN.
- percent
[optional] The character used as a percent sign; the default value is the percent character (%).
- per-mille
[optional] The character used as a per mille (per thousand) sign; the default value is the Unicode per-mille character (#x2030).
- zero-digit
[optional] The character used as the digit zero; the default value is the digit zero (0).
- digit
[optional] The character used in a format pattern to indicate a place where a leading zero digit is required. The default value is "#".
- pattern-separator
[optional] The character used to separate positive and negative sub patterns in a pattern; the default value is the semi-colon character (;).