[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Unique Particle Attribution

From: <noah_mendelsohn@us.ibm.com>
Date: Wed, 9 Feb 2005 14:38:01 -0500
To: "Zafar Abbas" <zafara@microsoft.com>
Cc: xmlschema-dev@w3.org
Message-ID: <OF14C94D96.892D7F29-ON85256FA3.006BE32F@lotus.com>
violation of unique particle attribution

Yes, this is a violation; the content model of 'type' does not obey the 
UPA constraint.  Note that if the minOccurs for the "b" reference were >=1 
there would be no violation, as for a given <a> element you would know for 
sure that it came before or after the b.  In schema terms, the content 
model for the sequence of "type" has three particles, and you can't tell 
whether one or more <a> elements match the first or the third.

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------








"Zafar Abbas" <zafara@microsoft.com>
Sent by: xmlschema-dev-request@w3.org
02/09/2005 01:49 PM

 
        To:     <xmlschema-dev@w3.org>
        cc:     (bcc: Noah Mendelsohn/Cambridge/IBM)
        Subject:        Unique Particle Attribution



>From my reading of the Unique Particle Attribution constraint in the
spec, the following schema is a violation:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:complexType name="type"> 
<xsd:sequence>
                 <xsd:element ref="a" minOccurs="0"/>
                 <xsd:element ref="b" minOccurs="0"/>
                 <xsd:element ref="a" maxOccurs="2"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="a" />
<xsd:element name="b" />
</xsd:schema>


It can not be known which particle (a) to validate, even through they
are references to the same element schema component. Is this
understanding correct?

Thanks.
Received on Wednesday, 9 February 2005 20:54:10 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.