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

Re: Need help with Unique Particle Attribution Rule

From: Xan Gregg <xan.gregg@jmp.com>
Date: Fri, 7 Jan 2005 09:47:58 -0500
Message-Id: <1F31FD02-60BB-11D9-80EA-000A95B51846@jmp.com>
Cc: "'Vinotha Suntharalingam'" <vinos@carbontwelve.com>, <xmlschema-dev@w3.org>
To: "Michael Kay" <mike@saxonica.com>
unique particle attribution rule xml

On Jan 7, 2005, at 9:02 AM, Burak Emir wrote:
> (b,a?)*,c*,b? == your content model

Your proof starts at the wrong place.  It should be

   (a,b?)*,c*,b?

though a similar proof may be available.

On Jan 7, 2005, at 9:11 AM, Michael Kay wrote:
> This is actually one of those examples where the Thompson/Tobin 
> algorithm used by XSV and Saxon doesn't give a UPA error, because the 
> two particles for element "error" both refer to the same element 
> declaration. The Thompson/Tobin algorithm lets a content model through 
> if the element declaration for each element can be determined 
> unambiguously, even if the particle can't. 

Not sure how I feel about that.  Seems dangerous to relax such a core 
constraint, but I can't find any real problem with it.  A hypothetical 
problem is some system that treats particles as primitives -- maybe a 
data mapping solution that maps A to an object and A+ to an array of 
objects, so it cares which particle A is in.  Does anybody do that?

> I think the following content model is equivalent, and passes the 
> stricter version of the UPA test:
>  
> <xsd:element name="systemProvider">
>     <xsd:complexType>
>         <xsd:sequence>
>             <xsd:sequence minOccurs="0" maxOccurs="unbounded">
>                 <xsd:element ref="admin"/>
>                 <xsd:element ref="error" minOccurs="0"/>
>             </xsd:sequence>
>             <xsd:sequence minOccurs="0">
>                <xsd:element ref="deviceTypeInfo" 
> maxOccurs="unbounded"/>
>                <xsd:element ref="error" minOccurs="0"/>
>             </xsd:sequence>
>         </xsd:sequence>
>     </xsd:complexType>
> </xsd:element>

I imagine that captures the intent, even though it removes the 
<admin><error><error> case.

xan
Received on Friday, 7 January 2005 14:48:07 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.