Hey,
im searching for the best solution of my xml schema (xsd)
I have an response:
<xs:element name="exampleCatalogResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="meta" type="tns:metaType" />
<xs:element name="data" type="tns:defaultDataType" />
</xs:sequence>
</xs:complexType>
</xs:element>
...the default datatype:
<xs:complexType name="defaultDataType">
<xs:sequence>
<xs:element name="catalog">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element name="catalogItem" type="tns:catalogItem" />
</xs:sequence>
</xs:complexType>
<xs:unique name="itemIdConstraint">
<xs:selector xpath="tns:catalogItem" />
<xs:field xpath="tns:id" />
</xs:unique>
</xs:element>
</xs:sequence>
</xs:complexType>
...and the catalogItem
<xs:complexType name="catalogItem">
<xs:sequence>
<xs:element name="id" type="xs:nonNegativeInteger" />
</xs:sequence>
</xs:complexType>
...but now there is a special item which specialize catalogItem
<xs:complexType name="specialItem">
<xs:complexContent>
<xs:extension base="tns:catalogItem">
<xs:sequence>
<xs:element name="code" type="xs:string" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
Now i need an specialized Response for my specialItem for answering the request which expects this "specialItem".
How can i realise this? Without writing another defaultDataType where only the type of "catalogItem" changes to "tns:specialItem" ?
Thanks in advantage