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

Re: UPA example

From: C. M. Sperberg-McQueen <cmsmcq@acm.org>
Date: Tue, 1 Jul 2008 13:39:56 -0600
Message-Id: <71243447-FDF3-4C69-9B35-218645FAFE3F@acm.org>
Cc: "C. M. Sperberg-McQueen" <cmsmcq@acm.org>, xmlschema-dev@w3.org
To: Boris Kolpackov <boris@codesynthesis.com>
Re: UPA example

On 24 Jun 2008, at 08:55 , Boris Kolpackov wrote:

> Consider the following schema:
>
> <schema xmlns="http://www.w3.org/2001/XMLSchema"
> 	targetNamespace="test"
>         elementFormDefault="qualified">
>
>   <complexType name="AnyTargetNamespace">
>     <sequence maxOccurs="unbounded">
>       <element name="apple" type="string"/>
>       <any namespace="##targetNamespace" processContents="skip"     
> maxOccurs="unbounded"/>
>     </sequence>
>   </complexType>
>
> </schema>
>
> My interpretation of the specification suggests that this schema
> violates the Unique Particle Attribution constraint in that a
> content like this:
>
> <apple/>
> <apple/>
> <apple/>
>
> Can be validated in two ways:
>
> <apple/> validated by element
> <apple/> validated by any
> <apple/> validated by any
>
> Or:
>
> <apple/> validated by element
> <apple/> validated by any
> <apple/> validated by element
>
> Does anybody think this is not the case and if so, why?

It seems to depend on what you mean by the word "validated".  If
you mean "accepted as valid", then no, the second parse does not
accept the input as valid (because in the second iteration through
the sequence, there is a match for the element particle, but not for
the wildcard particle, which has minOccurs=1).

But if you mean only that the validation process can assign
any prefix of three 'apple' elements to two different sequences of
particles, then yes, you are right, those three input elements
could be assigned in either of the two ways you describe, and
the content model thus fails to satisfy the determinism rule.

--Michael Sperberg-McQueen
   W3C
Received on Tuesday, 1 July 2008 19:41:21 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.