xsl:decimal-format
Indicates a set of localisation parameters. If the
xsl:decimal-format element has a name attribute,
it identifies a named format; if not, it identifies the default format.
Category: declaration
Content: none
Permitted parent elements:
xsl:package
; xsl:stylesheet
; xsl:transform
Attributes
|
| A named format; if the attribute is omitted then the default format is used. |
|
| Specifies the string used to separate the
integer part from the fractional part of the formatted number; the default is
the period character ( |
|
| Specifies the string typically used as a
thousands separator; the default is the comma character ( |
|
| Specifies the string used to represent the
|
|
| Specifies the string used to signal a negative number;
the default is the hyphen-minus character ( |
|
| Specifies the string used to separate the
mantissa part from the exponent part of the formatted number; the default is the
character ( |
|
| Specifies the string used to represent the
|
|
| Specifies the string used to indicate that the number is
represented as a per-hundred fraction; the default is the percent character
( |
|
| Specifies the string used to indicate that the number is
represented as a per-thousand fraction; the default is the Unicode per-mille
character ( |
|
| Specifies the character used to represent the digit
zero; the default is the Western digit zero ( |
|
| Specifies the character used as a place-holder for an
optional digit in the picture string; the default is the number sign character
( |
|
| Specifies the character used to separate
positive and negative sub-pictures in a picture string; the default is the
semi-colon character ( |
Saxon availability
Available in XSLT 1.0 and later versions. Available in all Saxon editions. Available for all platforms.
Details
In practice decimal formats are used only for formatting numbers using the format-number() function in XPath expressions.
With XSLT 3.0, the specification of format-number() has moved into
XPath which means it is also available in XQuery. The
exponent-separator attribute is new in XPath 3.1, and allows
formating of numbers in scientific notation.
In XSLT 4.0, the strings used in the formatted number to represent a decimal separator, grouping separator, exponent separator, percent sign, per mille sign, or minus sign, are no longer constrained to be single characters.