Parts of Decimal Formats

The <xsl:decimal-format> element lets us define named formats for decimal numbers. Each named format is a group of settings for the properties discussed in Table F-2.

Table F-2. Parts of decimal formats
Part nameMeaningDefault value
nameGives a name to this format.N/A
decimal-separatorDefines 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.. (period)
grouping-separatorDefines 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., (comma)
infinityDefines 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.Infinity
minus-signDefines the character used as the minus sign. This character is used only in the output. (hyphen, &#x2D;)
NaNDefines the string displayed when the value to be formatted is not a number. This string is used only in the output.NaN
percentDefines the character used as the percent sign. This character is used both in the format string and in the output.% (percent sign)
per-milleDefines the character used as the per-mille sign. This character is used both in the format string and in the output. (Unicode per-mille character, &#x2030;).
zero-digitDefines the character used for the digit zero. This character is used both in the format string and in the output. ...

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.