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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.