I hate to post this again, but no one replied, so I thought I'd ask for one
more plea of assistance.

I was able to fix the problem when I turn of full checking, but I'd rather
leave it on if I could.

I've tried debugging the code a bit, but I'm just not familiar enough with
the code base to determine what's going on.

Thanks.

-----Original Message-----
From: Beyer,Nathan [mailto:[EMAIL PROTECTED]
Sent: Friday, December 07, 2001 5:20 PM
To: Xerces-J-User (E-mail)
Subject: XML Schema Validation error/possible bug?


Here's the scenario:

The schema below is valid in both XMLSpy 4.1 and according to the IBM Schema
Quality Checker. When I try to validate the schema against the XML using
Xerces I get the following error: Error: cos-nonambig: (,Avg) and (,Avg)
violate the "Unique Particle Attribution" rule.

The weird thing is that when I change the minOccurs of either the "Min"
element and the "Max" element to 1 (or both), it validates without any
errors.
This is done using Xerces, version 1.4.3.

Can someone help me with this? This is causing a huge problem for me.

Thanks.
-Nathan

The XML -
<?xml version="1.0" encoding="UTF-8"?>
<Bill>
        <Amount>25</Amount>
</Bill>

The XML Schema -
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified">
        <xsd:element name="Bill">
                <xsd:complexType>
                        <xsd:choice>
                                <xsd:group ref="FirstGroup"/>
                                <xsd:group ref="SecondGroup"/>
                                <xsd:group ref="ThirdGroup"/>
                        </xsd:choice>
                </xsd:complexType>
        </xsd:element>
        <xsd:group name="FirstGroup">
                <xsd:sequence>
                        <xsd:element name="Amount" type="xsd:integer"
minOccurs="0" maxOccurs="1"/>
                </xsd:sequence>
        </xsd:group>
        <xsd:group name="SecondGroup">
                <xsd:sequence>
                        <xsd:element name="Min" type="xsd:integer"
minOccurs="0" maxOccurs="1"/>
                        <xsd:element name="Avg" type="xsd:integer"
minOccurs="0" maxOccurs="1"/>
                </xsd:sequence>
        </xsd:group>
        <xsd:group name="ThirdGroup">
                <xsd:sequence>
                        <xsd:element name="Max" type="xsd:integer"
minOccurs="0" maxOccurs="1"/>
                        <xsd:element name="Avg" type="xsd:integer"
minOccurs="0" maxOccurs="1"/>
                </xsd:sequence>
        </xsd:group>
</xsd:schema>


CONFIDENTIALITY NOTICE

This message and any included attachments are from Cerner Corporation and are 
intended only for the addressee. The information contained in this message is 
confidential and may constitute inside or non-public information under 
international, federal, or state securities laws. Unauthorized forwarding, 
printing, copying, distribution, or use of such information is strictly 
prohibited and may be unlawful. If you are not the addressee, please promptly 
delete this message and notify the sender of the delivery error by e-mail or 
you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) 
(816)221-1024.
-------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to