Title: Message
A quick glance suggests that if you have
   <foo xsi:type="ExtendedDataElementType">
     <hexValue>...</hexValue>
   </foo>
the hexValue element could either be branch #2 (hexValue) or branch #3 (any) of the choice.  This indeterminacy is illegal.
 
Jeff
----- Original Message -----
Sent: Thursday, January 08, 2004 10:03 AM
Subject: Schema Help

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>
 
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.

Reply via email to