Name

<xsl:decimal-format>

Defines a number format to be used when writing numeric values to the output document. If the <decimal-format> does not have a name, it is assumed to be the default number format used for all calls to the format-number() function. On the other hand, if a number format is named, it can be referenced from the format-number() function.

Category

Top-level element.

Required Attributes

None.

Optional Attributes

name

Gives a name to this format.

decimal-separator

Defines the character (usually either a period or comma) used as the decimal point. This character is used both in the format string and in the output. The default value is the period character (.).

grouping-separator

Defines the character (usually either a period or comma) used as the thousands separator. This character is used both in the format string and in the output. The default value is the comma (,).

infinity

Defines the string used to represent infinity. Be aware that XSLT’s number facilities support both positive and negative infinity. This string is used only in the output. The default value is the string "Infinity".

minus-sign

Defines the character used as the minus sign. This character is used only in the output. The default value is the hyphen character (-, &#x2D;).

NaN

Defines the string displayed when the value to be formatted is not a number. This string is used only in the output; the default value is the string "NaN".

percent

Defines the character used as the percent sign. This character is used both in ...

Get XSLT, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.