W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2008

UPA example

From: Boris Kolpackov <boris@codesynthesis.com>
Date: Tue, 24 Jun 2008 16:55:03 +0200
To: xmlschema-dev@w3.org
Message-ID: <20080624145503.GE7443@karelia>


Consider the following schema:

<schema xmlns="http://www.w3.org/2001/XMLSchema"

  <complexType name="AnyTargetNamespace">
    <sequence maxOccurs="unbounded">
      <element name="apple" type="string"/>
      <any namespace="##targetNamespace" processContents="skip" maxOccurs="unbounded"/>


My interpretation of the specification suggests that this schema
violates the Unique Particle Attribution constraint in that a
content like this:


Can be validated in two ways:

<apple/> validated by element
<apple/> validated by any
<apple/> validated by any


<apple/> validated by element
<apple/> validated by any
<apple/> validated by element

Does anybody think this is not the case and if so, why?


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 15:20:46 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:47 UTC