XML technologies / XML Schema / Data type reference / xs:integer

(Excerpt from “XML Schema” by Eric van der Vlist)

Signed integers of arbitrary length

Derived from: xs:decimal

Primitive type: xs:decimal

Known subtypes: xs:nonPositiveInteger, xs:long, xs:nonNegativeInteger

Facets: xs:enumeration, xs:fractionDigits, xs:maxExclusive, xs:maxInclusive, xs:minExclusive, xs:minInclusive, xs:pattern, xs:totalDigits, xs:whiteSpace

Definition

<xs:simpleType name="integer" id="integer">
    <xs:restriction base="xs:decimal">
        <xs:fractionDigits value="0" fixed="true"/>
    </xs:restriction>
</xs:simpleType>

Description

The value space of xs:integer contains all signed integers without range limits. The lexical space permits any number of insignificant leading zeros.

Restrictions

A decimal point is forbidden, even when followed only by insignificant zeros.

-0 and +0 are treated as equal, unlike the behavior of xs:float and xs:double.

Example

Valid values for xs:integer include "-123456789012345678901234567890", "2147483647", "0" or "-0000000000000000000005".

Invalid values include "1.", "2.6" and "A".

   

<< back

next >>

 

 

 

back to top