Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

decimal-format

Syntax

Description

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.

Attributes

decimal-format format-name

Decimal-format identifier, which is passed as the third argument to the format-number() XPath function.

decimal-separator character

Character used as the decimal sign. The default is the period (.).

digit character

Character used to represent a digit in a pattern. The default is the number sign (#).

grouping-separator character

Character used as the digit group separator or the thousands separator. The default is the comma (,).

infinity string

String used to represent infinity. The default is "Infinity".

minus-sign character

Character used as the minus sign. The default is the hyphen (-).

nan string

String used to represent NaN. The default is "NaN".

pattern-separator character

Character 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 character

Character used as the percent sign. The default is the percent character (%).

per-mille character

Character used as a per mille sign. The default is the Unicode per mille sign (\x2030 or ‰).

zero-digit character

Character 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

Release Information

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