Schema Central > XML Schema 1.1 > xsd:decimal
Advanced search
Need XML Help?

Recommended Reading:

Definitive XML Schema

 

Web Service Contract Design and Versioning for SOA

 

Advanced XML Applications

 

xsd:decimal

The type xsd:decimal represents a decimal number of arbitrary precision. Schema processors vary in the number of significant digits they support, but a conforming processor must support a minimum of 18 significant digits. The format of xsd:decimal is a sequence of digits optionally preceded by a sign ("+" or "-") and optionally containing a period. The value may start or end with a period. If the fractional part is 0 then the period and trailing zeros may be omitted. Leading and trailing zeros are permitted, but they are not considered significant. That is, the decimal values 3.0 and 3.0000 are considered equal.

Simple Type Information

Namespace: http://www.w3.org/2001/XMLSchema

Schema Document: builtintypes.xsd

Content

Examples

Valid valuesComment
3.0
-3.0a negative sign is permitted
+3.5a positive sign is permitted
3a decimal point is not required
.3the value can start with a decimal point
3.the value can end with a decimal point
0
-.3
0003.0leading zeros are permitted
3.0000trailing zeros are permitted
Invalid valuesComment
3,5commas are not permitted; the decimal separator must be a period
an empty value is not valid, unless xsi:nil is used

Type Inheritance Chain

Site developed and hosted by Datypic, Inc.

Please report errors or comments about this site to contrib@functx.com