XML technologies / XML Schema / Data type reference / xs:decimal
(Excerpt from “XML Schema” by Eric van der Vlist)
Decimal numbers
Derived from: xs:anySimpleType
Primitive type: xs:decimal
Known subtypes: xs:integer
Facets: xs:enumeration, xs:fractionDigits, xs:maxExclusive, xs:maxInclusive, xs:minExclusive, xs:minInclusive, xs:pattern, xs:totalDigits, xs:whiteSpace
Definition
<xs:simpleType name="decimal" id="decimal">
<xs:restriction base="xs:anySimpleType">
<xs:whiteSpace value="collapse" fixed="true"/>
</xs:restriction>
</xs:simpleType>Description
xs:decimal represents all decimal numbers of arbitrary length. Its lexical space permits any number of insignificant leading zeros, as well as insignificant trailing zeros after the decimal point.
Restrictions
The decimal separator is always a period (.), and no thousands separator is allowed. Exponential notation is unsupported.
Example
Valid values include: "123.456", "+1234.456", "-1234.456", "-.456" or "-456".
The following values would be invalid: "1 234.456" (spaces are forbidden), "1234.456E+2" (exponential notation, "E+2", is forbidden), "+ 1234.456" (spaces are forbidden) or "+1,234.456" (thousands separators are forbidden).
Copyright © 2003 O'Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from “XML Schema” is subject to the same conditions as the bound edition. The work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de