I have a schema that has a local complexType element as follows.
<xs:complexType name="AddressType">
<xs:sequence>
<xs:element name="Line1" type="xs:string" minOccurs="0"/>
<xs:element name="Line2" type="xs:string" minOccurs="0" maxOccurs="100"/>
<xs:element name="Location" minOccurs="0" maxOccurs="100">
<xs:complexType>
<xs:sequence>
<xs:element name="XCoordinate" type="xs:decimal" minOccurs="0"/>
<xs:element name="YCoordinate" type="xs:decimal" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
I am trying to extend this complexType as follows
<xs:complexType name="InternalAddressType">
<xs:complexContent>
<xs:restriction base="AddressType">
<xs:sequence>
<xs:element name="Location" >
</xs:element>
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
I am getting the following error
**Error for type 'InternalAddressType'. The particle of the type is not a valid restriction of the particle of the base.
Can anyone please help me understand what am I doing worng. It seems that the problem is that the Location is a local ComplexType. But I can not change that since I am getting the xsd from the client and need to extend just the Loaction. How can I solve this situation. Any other suggestions are welcome.