- From: Kriegesmann, Peter <Peter.Kriegesmann@softwareag.com>
- Date: Mon, 25 Mar 2002 19:21:47 +0100
- To: "'noah_mendelsohn@us.ibm.com'" <noah_mendelsohn@us.ibm.com>
- Cc: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Thank you very much for your help Noah. This was exactly the information I needed. In fact I thought an "intelligent" parser might scan further particles and let the document pass, if there are only element references. But this is a violation against http://www.w3.org/TR/xmlschema-1/#coss-modelGroup 3.8.6 Constraints on Model Group Schema Components Schema Component Constraint: Unique Particle Attribution the particle contained .... can be uniquely determined without examining the content or attributes of that item, and without any information about the items in the remainder of the sequence. So you are right, Thank you very much, Peter -----Original Message----- From: noah_mendelsohn@us.ibm.com [mailto:noah_mendelsohn@us.ibm.com] Sent: Montag, 25. Marz 2002 18:47 To: Kriegesmann, Peter Cc: xmlschema-dev@w3.org Subject: Re: constraints on model group schema components: Unique Particle Att ribution In your example, the fragment: <xs:element name = "child"> <xs:complexType> <xs:sequence> <xs:element ref = "x" minOccurs = "0"></xs:element> <xs:element ref = "x" minOccurs = "0"></xs:element> </xs:sequence> </xs:complexType> </xs:element> violates the unique article attribution constraint. Reason: when validating the instance <child> <x/> </child> you don't know whether the <x/> matches the first for the second reference to x. If you look at the specification at [1] you will see that the declaration of the sequence turns into a list of two particles. The fact that both particles reference the same declaration as their {term} [2] does not result in the two particles being combined. There are two particles and thus an ambiguity. [1] http://www.w3.org/TR/xmlschema-1/#Model_Group_details [2] http://www.w3.org/TR/xmlschema-1/#cParticles ------------------------------------------------------------------ Noah Mendelsohn Voice: 1-617-693-4036 IBM Corporation Fax: 1-617-693-8676 One Rogers Street Cambridge, MA 02142 ------------------------------------------------------------------
Received on Monday, 25 March 2002 13:22:04 UTC