xs:decimal

The data type xs:decimal represents a subset of the real numbers that can be represented by decimal numerals.

Lexical form of xs:decimal

The lexical form of xs:decimal is a finite-length sequence of decimal digits (0 to 9) that are separated by a period as a decimal indicator. An optional leading sign is allowed. If the sign is omitted, a positive sign (+) is assumed. Leading and trailing zeroes are optional. If the fractional part is zero, the period and any following zeroes can be omitted. The following numbers are all valid examples of a decimal: -1.23, 12678967.543233, +100000.00, 210. .

Constructor of xs:decimal

Use the following syntax to construct an instance of xs:decimal:

Read syntax diagramSkip visual syntax diagramxs:decimal( value)
value
The value that is to be constructed. If this value is an empty sequence, the empty sequence is returned.

If value is illegal for the target data type, the constructor function returns an error.