Restricting OASIS Schemas
I am trying to create a restriction for the CountryType defined in http://docs.oasis-open.org/ciq/v3.0/prd03/xsd/default/xsd/xAL.xsd

Basically I just want the NameElement element in CountryType to be mandatory.

I have tried a few combination of the following snippet, but to no avail.


 <xs:complexType name="MyCountryType">
  <xs:complexContent>
   <xs:restriction base="xal:CountryType">
    <xs:sequence>
     <xs:element name="NameElement" maxOccurs="1" />
    </xs:sequence>
   </xs:restriction>
  </xs:complexContent>
 </xs:complexType>

The difference between the example in customization guides for UBL in the OASIS site and the one I am doing is the element NameElement is not a global element and therefore cannot be referenced by the "ref" attribute.

Is there any way of doing this?
Restricting OASIS Schemas
===

I am trying to create a restriction for the CountryType defined in http://docs.oasis-open.org/ciq/v3.0/prd03/xsd/default/xsd/xAL.xsd

Basically I just want the NameElement element in CountryType to be mandatory.

I have tried a few combination of the following snippet, but to no avail.


 <xs:complexType name="MyCountryType">
  <xs:complexContent>
   <xs:restriction base="xal:CountryType">
    <xs:sequence>
     <xs:element name="NameElement" maxOccurs="1" />
    </xs:sequence>
   </xs:restriction>
  </xs:complexContent>
 </xs:complexType>

The difference between the example in customization guides for UBL in the OASIS site and the one I am doing is the element NameElement is not a global element and therefore cannot be referenced by the "ref" attribute.

Is there any way of doing this?