You can derive new simple types from existing types by restricting the type to a subset of its normal values
An xsd:simpleType
element defines the restricted type
The name
attribute
of xsd:simpleType
assigns a name to the new type,
by which it can be referred to in xsd:element
type
attributes.
An xsd:restriction
child element specifies
what type is being restricted via its base
attribute.
Facet children of xsd:restriction
specify the constraints on the type.
For example, this xsd:simpleType
element defines
a phonoYear
as any year from 1877 (the year Edison invented the
phonograph) on:
<xsd:simpleType name="phonoYear">
<xsd:restriction base="xsd:gYear">
<xsd:minInclusive value="1877"/>
</xsd:restriction>
</xsd:simpleType>
Then you declare the year element like this:
<xsd:element type="phonoYear" />