Decimal data type ¶
The decimal data type is used to specify a numeric value.
The following is an example of a 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 something like this:
<prize>-999.5230</prize>
Or something like this:
<prize>0</prize>
Or something like this:
<prize>14</prize>
注意: The maximum number of decimal digits you can specify is 18 digits.
Integer data type ¶
Integer data types are used to specify values that have no decimal components.
The following is an example of an 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 something like this:
<prize>-999</prize>
Or something like this:
<prize>0</prize>
Numeric data type ¶
Note that all of the following data types are derived from decimal data types (except decimal itself)!
First name | Number of seconds |
|---|---|
Byte | 8-bit integers with plus or minus |
Decimal | Decimal number |
Int | 32-bit integers with plus or minus |
Integer | Integer value |
Long | 64-bit integers with plus or minus |
NegativeInteger | Integers that contain only negative values (.,-2,-1.) |
NonNegativeInteger | Contains only integers with non-negative values (0,1,2,..) |
NonPositiveInteger | Only integers that contain non-positive values (.,-2,-1, 0) |
PositiveInteger | Integers containing only positive values (1, 2,..) |
Short | 16-bit integers with plus or minus |
UnsignedLong | 64-bit integers without positive or negative |
UnsignedInt | 32-bit integers without positive or negative |
UnsignedShort | 16-bit integers without positive or negative |
UnsignedByte | An 8-bit integer with no positive or negative |
Qualification of numeric data types (Restriction) ¶
Restrictions that can be used with numeric data types:
Enumeration
FractionDigits
MaxExclusive
MaxInclusive
MinExclusive
MinInclusive
Pattern
TotalDigits
WhiteSpace