Problem validating an XSD file: The content type of a derived type and that of its base must both be mixed or both be element-only
- by Paulo Tavares
Hi,
I have following XML schema:
<?xml version="1.0" encoding="UTF-8"?>
<schema
xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0"
targetNamespace="urn:ietf:params:xml:ns:netconf:base:1.0"
...
<complexType name="dataInlineType">
<xs:complexContent>
<xs:extension base="xs:anyType"/>
</xs:complexContent>
</complexType>
<complexType name="get-config_output_type__" >
<complexContent>
<extension base="netconf:dataInlineType">
<sequence>
<element name="data">
<complexType>
<sequence>
<element name="__.get-config.output.data.A__"
minOccurs="0" maxOccurs="unbounded"
/>
</sequence>
</complexType>
</element>
<element name="__.get-config.A__" minOccurs="0"
maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
And I getting the folling error:
cos-ct-extends.1.4.3.2.2.1.a: The content type of a derived type and that of its base must both be mixed or both be element-only. Type 'get-config_output_type__' is element only, but its base type is not.
If I put both elements mixed="true" I get another error:
cos-nonambig: WC[##any] and "urn:ietf:params:xml:ns:netconf:base:1.0":data (or elements
from their substitution group) violate "Unique Particle Attribution". During validation against this schema, ambiguity would be created for those two particles.
I using the Eclipse to validate my schema, so what can I do?