Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - XSLT Reference

<xsl:decimal-format> Element

Declares a decimal-format, which controls the interpretation of a format pattern used by the format-number function. If there is a name attribute, the element declares a named decimal-format; otherwise, it declares the default decimal-format. The value of the name attribute is a qualified name (QName). An error occurs if you 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).

For more information, see format-number Function.

<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, 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 (";"). An example of the semi-colon used in a pattern is the following:
format-number(-123.45, '###,###.00;(###,###.00)')

Element Information

Number of occurrences Unlimited
Parent elements xsl:stylesheet, xsl:transform
Child elements (No child elements)

The following topic provides an example of <xsl:decimal-format>.