- From: <noah_mendelsohn@us.ibm.com>
- Date: Thu, 28 Mar 2002 12:17:16 -0500
- To: "Kriegesmann, Peter" <Peter.Kriegesmann@softwareag.com>
- Cc: xmlschema-dev@w3.org
In this version of the schema language, there is considered to be only one particle on the grammar you give, and hence no violoation of UPA. This choice has some utility. Also note that an annotation on the particle can be reliably associated with the corresponding content (in this example, with both child elements.) The Schema WG recognizes the sense in which there is in fact no unique attribution. It does indeed complicate the construction of certain types of validator. It's my impression that the WG may consider revising the UPA rule in future versions of schema (though there is debate is to whether or how to loosen or to tighten it.) ------------------------------------------------------------------ Noah Mendelsohn Voice: 1-617-693-4036 IBM Corporation Fax: 1-617-693-8676 One Rogers Street Cambridge, MA 02142 ------------------------------------------------------------------ "Kriegesmann, Peter" <Peter.Kriegesmann@softwareag.com> Sent by: xmlschema-dev-request@w3.org 03/28/02 10:02 AM To: xmlschema-dev@w3.org cc: (bcc: Noah Mendelsohn/Cambridge/IBM) Subject: Unique Particle Attribution question Dear friends of the XML Schema, Today I have another question about unique particle attribution as a result of a discussion within our group. Take a look at the following schema: <?xml version = "1.0" encoding = "UTF-8"?> <xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema"> <xs:element name = "rabbit"> <xs:complexType> <xs:sequence minOccurs = "0" maxOccurs = "unbounded"> <xs:element name = "egg" type = "xs:string"></xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> and the corresponding xml document: <rabbit> <egg/> <egg/> </rabbit> My question: Does the schema violate against the "Unique particle attribution" [1] ?. My colleague says yes, because it cannot be determined, if the 2 "egg"-elements are a product of 1 or 2 sequence-elements and so the part of the unique particle attribution [1]("each item in the sequence in turn can be uniquely determined") is not fulfilled. In my opinion and according to [2] (which does not claim to be complete) I do not see a violation, because there is no "overlap" and each item can be uniquely determined, as there is only one matching element definition (element-definition of "egg"). The XML document also passes IBM Schema Quality Checker without warnings or errors. Your help and opinion is welcome. Best regards, Peter [1] http://www.w3.org/TR/xmlschema-1/#coss-modelGroup [2] http://www.w3.org/TR/xmlschema-1/#non-ambig Peter Kriegesmann Phone 06151-921484 Electronic Business Technologies (QE) Fax 06151-921612 Software AG http://www.softwareag.com Uhlandstrasse 12 D-64297 Darmstadt mailto:Peter.Kriegesmann@softwareag.com
Received on Thursday, 28 March 2002 12:40:03 UTC