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

RE: Unique Particle Attribution

From: Michael Kay <mike@saxonica.com>
Date: Wed, 9 Feb 2005 19:40:33 -0000
To: "'Zafar Abbas'" <zafara@microsoft.com>, <xmlschema-dev@w3.org>
Message-Id: <E1CyxhV-0001eM-00@ukmail1.eechost.net>
RE: Unique Particle Attribution

Yes, the requirement is to identify a particle uniquely, not just an element
declaration.

However, some schema processors including XSV and Saxon use an algorithm
that only requires the element declaration to be identified uniquely, and
therefore let this one through.

Michael Kay
http://www.saxonica.com/
 

> -----Original Message-----
> From: xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] On Behalf Of Zafar Abbas
> Sent: 09 February 2005 18:49
> To: xmlschema-dev@w3.org
> 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 19:40:39 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.