Hello guys!
I'm trying to extend a element in my XML Scheme, but its not working:
<xs:complexType name="instituicaoComPais">
<xs:complexContent>
<xs:extension base="instituicao">
<xs:sequence>
<xs:element ref="pais"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="instituicao">
<xs:complexType>
<xs:sequence>
<xs:element ref="departamento"/>
<xs:element ref="universidade"/>
</xs:sequence>
</xs:complexType>
</xs:element>
The error I'm getting is Warning 3 Undefined complexType 'instituicao' is used as a base for complex type extension.
.
What should I do?
EDIT
I use this two different elements like this:
<xs:element name="autor">
<xs:complexType>
<xs:sequence>
<xs:element ref="nome"/>
<xs:choice>
<xs:element ref="instituicao"/>
<xs:element ref="instituicaoComPais"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>