You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by James Bates <ja...@amplexor.com> on 2002/10/04 17:29:04 UTC
Schema validation
Considering this piece of schema:
<xs:complexType name="seqType">
<xs:sequence>
<xs:sequence minOccurs="2" maxOccurs="3">
<xs:element ref="A" minOccurs="3" maxOccurs="5" />
</xs:sequence>
</xs:sequence>
</xs:complexType>
I would expect an instance such as:
<root xsi:type="seqType">
<A/>
<A/>
....
</root>
to validate only if the number of A's can be expressed as a product of 2 or 3
with 3, 4 or 5, i.e. 6,8,9,10,12 or 15 A's. If there were 7,11,13 or 14 A's,
then the instance shouldn't validate. This is my understanding from several
readings of paragraphs 3.8.4 and 3.9.4 part 3) of the XMLSchema
specification, part 1.
Using Xerces 2.2.0, it would however appear to validate any number of A's
between 6 and 15. (MSXML4 demonstrates identical behaviour btw)
That's even with the
"http://apache.org/xml/features/validation/schema-full-checking" feature
turned on. Is this a (known) bug? Or am I misreading the XML Schema's spec?
Thanks,
James
As far as can understand paragraphs 3.8.4 and 3.9.4 part 3) of the XMLSchema
specification, part 1, this is wrong, .
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org