I am trying to create an XML Schema type definition by deriving from another
type definition using restriction. For example suppose my base type was
this:
<xs:schema <<schema element setup>> >
<xs:complexType name="Fruits">
<xs:sequence>
<xs:any minOccurs="8" maxOccurs="8"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
and I wanted to derive to create a type that requires that the first fruit
is an apple but still have a max of 8 "Fruits". For example without using
derivation I'd have:
<xs:schema <<schema element setup>> >
<xs:complexType name="Fruits">
<xs:sequence>
<xs:element name="Apple">
<xs:complexType/>
</xs:element>
<xs:any minOccurs="7" maxOccurs="7"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
How would I acheive this using derivation by restriction?
Thanks,
Wells