One of the
complexTypes in my schema as below:
<xsd:complexType
name="ExtendedDataElementType">
<xsd:sequence>
<xsd:choice>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="values">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="1024"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="hexValue" type="xsd:hexBinary"/>
<xsd:any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="children" type="cbe:ExtendedDataElementType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:sequence>
<xsd:choice>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="values">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="1024"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="hexValue" type="xsd:hexBinary"/>
<xsd:any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="children" type="cbe:ExtendedDataElementType"/>
</xsd:sequence>
</xsd:complexType>
When
I use Xerces (2.4.0) to validate a xml against the schema with the "schema full
checking" on, and getting the following error:
[Error] test.xsd:522:50: cos-nonambig: "http://someNameSpace":values and
WC[##any] (or elements from their substitution group) violate "Unique
Particle Attribution".
I think the complex type is not valid, but I don't know what's wrong, can someone help me how this complex type should be?
Thanks,
Benson.
