Title: Message
Hi Benson,
 
Most of the schema error messages issued by Xerces have a "code" just before the message. If you take that and append it to the XML Schema Part1: Structures URL as a fragment identifier you will get the relevant part of the specification corresponding with that error. In your case you get:
 
This means that a content model allows the selection of more that one particle for a given element as input. In general this kind of problems are solved by factoring the common part.
 
In your case the model is equivalent with:
 <xsd:complexType name="ExtendedDataElementType">
  <xsd:sequence>
    <xsd:any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
  </xsd:sequence>
 </xsd:complexType>
To derive a more constrained model one has to have more details about your actual needs.
 
Hope that helps,
 George
-------------------------------------------------------
George Cristian Bina mailto:[EMAIL PROTECTED]
<oXygen/> XML Editor - http://www.oxygenxml.com/
----- Original Message -----
Sent: Thursday, January 08, 2004 8:03 PM
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