W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2005

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>

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

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:49 GMT