XML Schema Numeric Data Type
Decimal data type
The decimal data type is used to specify a value.
The following is an example of decimal number declaration in a scheme.
<xs:element name="prize" type="xs:decimal"/>
The elements in the document should look like this:
<prize>999.50</prize>
Or something like this:
<prize>+999.5450</prize>
Or similar to this:
<prize>-999.5230</prize>
Or similar to this:
<prize>0</prize>
Or something like this:
<prize>14</prize>
Note: The maximum number of decimal digits you can specify is 18 digits.
Integer data type
The integer data type is used to specify values without decimal components.
The following is an example of integer declaration in a scheme.
<xs:element name="prize" type="xs:integer"/>
The elements in the document should look like this:
<prize>999</prize>
Or something like this:
<prize>+999</prize>
Or similar to this:
<prize>-999</prize>
<prize>-999</prize>
Or similar to this:
< ;prize>0</prize>
Numeric data type
Please note that all the following data types are derived from the decimal data type (Except decimal itself)!
Name | Seconds |
---|---|
- enumeration
- fractionDigits
- maxExclusive
- maxInclusive
- minExclusive
- minInclusive
- pattern
- totalDigits
- whiteSpace