XML Tutorial/XML Schema/int
specifies a sequence of zero to nine digits
<!-- schema -->
<xsd:element name="ninedigits">
<xsd:simpleType>
<xsd:restriction base="xsd:int">
<xsd:pattern value="\d{0,9}"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<!-- instance document -->
<ninedigits>217748364</ninedigits>
The int data type is derived from the long type.
The value space is integer values from ?47483648 up to and including 2147483647.
The lexical space is a finite-length sequence of decimal digits with an optional leading - or +.
<!-- schema -->
<xsd:element name="ninedigits">
<xsd:simpleType>
<xsd:restriction base="xsd:int">
<xsd:totalDigits value="9"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<!-- instance document -->
<ninedigits>217748364</ninedigits>