Hi Marc.
Current versiion of Xerces validates the Schema Component Constraint: Unique Particle Attribution.
Look at the XML Schema Structures spec for this. This is only done by Xerces when "full schema
check is turn on".
I tested this with dom.Writer sample:
+ dom.Writer -s yourxsd.xsd ..... validates fine.
+ dom.Writer -f - n yourxsd.xsd ..... fails with error.
[Error] WorkGrid.xsd:15:41: cos-nonambig: "":IndicationDaysAndHours and "":Indic
ationDaysAndHours (or elements from their substitution group) violate "Unique Pa
rticle Attribution". During validation against this schema, ambiguity would be c
reated for those two particles.
given in your schema if you comment one line it will validate just fine ( I remove the
source of ambiguity.....
<xs:complexType name="WorkGridType">
<xs:choice>
<xs:element ref="CommentWorkGrid"/>
<!- here just comment the next line -->
<!--xs:element ref="IndicationDaysAndHours" minOccurs="28" maxOccurs="28"/-->
<xs:sequence>
<xs:element ref="IndicationDaysAndHours" minOccurs="28" maxOccurs="28"/>
<xs:element ref="CommentWorkGrid">
<xs:annotation>
<xs:documentation>90037</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:choice>
</xs:complexType>
You must be doing schema-full-checking validation, Xerces parser have a feature that turns this
off "http://apache.org/xml/features/validation/schema-full-checking". Thiis value is set to false
by default
Regards, Jeffrey Rodriguez Silicon Valley
From: "Lefèvre, Marc" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> Subject: Schema validation Date: Fri, 12 Sep 2003 09:44:45 +0200
Hello,
I have a schema that I believe comply with the specification but I use it
for validation with Xerces 2.5 and I have:
[Error] wech506_20031.xsd:1112:38: cos-nonambig: "":IndicationDaysAndHours
and "
":IndicationDaysAndHours (or elements from their substitution group) violate
"Un
ique Particle Attribution". During validation against this schema, ambiguity
wou
ld be created for those two particles.
With Xerces 1.4.3 we had no validation errors.
What is the problem with my schema? Is it not compliant to W3C specification
(why)?
Can somebody explain how can I change my schema in order to make it works
and keep it functionally equivalent?
The root element of the schema is WorkGrid.
Thank you <<WorkGrid.xml>> <<WorkGrid.xsd>> Marc Lefevre Software Engineer email: marc.lefevre @softwareag.com Software AG Belgium 11, Avenue des Pléiades 1200 Bruxelles Tel: +32 (0) 32 2 777 02 90 Fax: +32 (0) 322 7719963
<< WorkGrid.xml >> << WorkGrid.xsd >> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Fast, faster, fastest: Upgrade to Cable or DSL today! https://broadband.msn.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]