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

Re: UPA example

From: Michael Glavassevich <mrglavas@ca.ibm.com>
Date: Tue, 24 Jun 2008 12:08:01 -0400
To: xmlschema-dev@w3.org
Message-ID: <OF7F335CF1.54DEFB7C-ON85257472.00583948-85257472.0058A90D@ca.ibm.com>
Re: UPA example
Yes, it violates UPA. After the first occurrence of the wildcard there
would be a choice between the wildcard and element particles and the two
overlap in what they accept.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

boris@codesynthesis.com wrote on 06/24/2008 10:55:03 AM:

> Hi,
>
> 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?
>
> Thanks,
> Boris
>
> --
> Boris Kolpackov, Code Synthesis Tools
http://codesynthesis.com/~boris/blog
> Open source XML data binding for C++:
http://codesynthesis.com/products/xsd
> Mobile/embedded validating XML parsing:
http://codesynthesis.com/products/xsde
Received on Tuesday, 24 June 2008 16:08:48 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.