Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?





Release Information

Statement introduced in version 1.1 of the SLAX language, which is supported in Junos OS Release 12.2 and later releases.


Define formatting parameters for use by the format-number() XPath function. The decimal-format statement must be defined as a top-level statement in the script.


decimal-format format-nameDecimal-format identifier, which is passed as the third argument to the format-number() XPath function.
decimal-separator characterCharacter used as the decimal sign. The default is the period (.).
digit characterCharacter used to represent a digit in a pattern. The default is the number sign (#).
grouping-separator characterCharacter used as the digit group separator or the thousands separator. The default is the comma (,).
infinity stringString used to represent infinity. The default is "Infinity".
minus-sign characterCharacter used as the minus sign. The default is the hyphen (-).
nan stringString used to represent NaN. The default is "NaN".
pattern-separator characterCharacter used to separate patterns. The first pattern is used for positive numbers, and the second pattern is used for negative numbers. The default is the semicolon (;).
percent characterCharacter used as the percent sign. The default is the percent character (%).
per-mille characterCharacter used as a per mille sign. The default is the Unicode per mille sign (\x2030 or ‰).
zero-digit characterCharacter used as zero. The default is the number zero (0).

SLAX Example

The following code snippet lists the defaults for the decimal-format parameters, and uses the defined decimal format in the format-number XPath function:

XSLT Equivalent

Related Documentation