In Altova XMLSpy 2014, I have a XSD document that defines:
- An abstract type, "t_abs".
- A concrete type, "t_con", defined as a sequence of elements, and one of the elements is defined as type "t_abs".
- An element (instanciable), "e_con", defined of type "t_con".
Is that correct? I think it should generate an error, since the abstract type is not being used as a base (by extension or restriction) for the concrete type, the abstract type (t_abs) is being used as the type of a concrete element into an instanciable concrete element (t_con).
Should XMLSpy return a warning of an abstract type being used into a concrete element?
Example:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" elementFormDefault="qualified" attributeFormDefault="unqualified" vc:minVersion="1.1">
<xs:complexType name="t_abs" abstract="true">
<xs:sequence>
<xs:element name="el" type="xs:string"/>
<xs:element name="e2" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="t_con">
<xs:sequence>
<xs:element name="e_t_con_1" type="xs:string"/>
<xs:element name="e_t_abs" type="t_abs"/>
<xs:element name="e_t_con_2" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="e_con" type="t_con"/>
</xs:schema>