restriction specifies values for zero or more constraining facets : restriction « XML Schema « XML Tutorial






<!-- schema -->
<xsd:element name="grades">
  <xsd:simpleType>
   <xsd:restriction base="xsd:string">
    <xsd:enumeration value="A"/>
    <xsd:enumeration value="B"/>
    <xsd:enumeration value="C"/>
    <xsd:enumeration value="D"/>
    <xsd:enumeration value="F"/>
   </xsd:restriction>
  </xsd:simpleType>
</xsd:element>








3.67.restriction
3.67.1.Deriving Custom Simple Types
3.67.2.Restriction types are declared using the declaration.
3.67.3.restriction specifies values for zero or more constraining facets
3.67.4.Deriving by Restriction