Deriving by Restriction : restriction « XML Schema « XML Tutorial






<xsd:complexType name="nameType">
  <xsd:sequence>
   <xsd:element name="firstName" type="xsd:string"/>
   <xsd:element name="middleName" type="xsd:string"/>
   <xsd:element name="lastName" type="xsd:string"/>
  </xsd:sequence>
</xsd:complexType>

<xsd:complexType name="nameTypeRestricted">
  <xsd:complexContent>
   <xsd:restriction base="nameType">
    <xsd:sequence>
     <xsd:element name="firstName" type="xsd:string"/>
     <xsd:element name="lastName" type="xsd:string"/>
    </xsd:sequence>
   </xsd:restriction>
  </xsd:complexContent>
</xsd:complexType>








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