Determines the minimum and maximum allowed values
Applies to ordered simple types including
byte, unsignedByte,
integer, positiveInteger,
negativeInteger, nonNegativeInteger,
nonPositiveInteger, int,
unsignedInt, long,
number, unsignedLong,
short, unsignedShort, number,
float, double, time,
timeInstant, timePeriod,
timeDuration, date, gMonth,
gYear, recurringDay,
and recurringDate.
For example, to say that the year must be between 1877 and 2100:
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="SONG" type="songType"/>
<xsd:simpleType name="phonoYear">
<xsd:restriction base="xsd:gYear">
<xsd:minInclusive value="1877"/>
<xsd:maxInclusive value="2100"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="songType">
<xsd:sequence>
<xsd:element name="TITLE" type="xsd:string"/>
<xsd:element name="COMPOSER" type="xsd:string"
maxOccurs="unbounded"/>
<xsd:element name="PRODUCER" type="xsd:string"
minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="PUBLISHER" type="xsd:string"
minOccurs="0"/>
<xsd:element name="LENGTH" type="xsd:timeDuration"/>
<xsd:element name="YEAR" type="phonoYear"/>
<xsd:element name="ARTIST" type="xsd:string"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>