Mega Code Archive

 
Categories / XML Tutorial / XML Schema
 

The positiveInteger datatype is derived from the nonNegativeInteger type

The value space is the infinite set of integers greater than or equal to 1.  The lexical space is a finite-length sequence of decimal digits with an optional leading +. <!-- schema --> <xsd:complexType name="record_sets">   <xsd:sequence>    <xsd:element name="record" minOccurs="0"     maxOccurs="unbounded">     <xsd:simpleType>      <xsd:restriction base="xsd:positiveInteger">       <xsd:pattern value="555\d{3}"/>      </xsd:restriction>     </xsd:simpleType>    </xsd:element>   </xsd:sequence> </xsd:complexType> <!-- instance document --> <record>555158</record> <record>555687</record> <record>555736</record>