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

Re: UPA example

From: Koray SAKIROGLU <koray.sakiroglu@gmail.com>
Date: Tue, 24 Jun 2008 17:48:47 +0200
Message-ID: <23e987b00806240848n6a1dce6ah49f096aadbefe9aa@mail.gmail.com>
To: "Boris Kolpackov" <boris@codesynthesis.com>
Cc: xmlschema-dev@w3.org
Hello, sorry for double message boris, I pressed reply instead of reply to
all

Am I wrong in thinking that

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

is impossible with your current schema declaration ? sequence minOccurs="1"
by default, since, in a sequence, elements can only appear in written
orders, you couldn't have an element after any, other than any ?
But then I probably missed some subtle (or not so subtle) declaration in
your schema.

I'd be glad if you could clear that up :)


2008/6/24 Boris Kolpackov <boris@codesynthesis.com>:

>
> 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<http://codesynthesis.com/%7Eboris/blog>
> Open source XML data binding for C++:
> http://codesynthesis.com/products/xsd
> Mobile/embedded <http://codesynthesis.com/products/xsdMobile/embedded>validating XML parsing:
> http://codesynthesis.com/products/xsde
>
>
Received on Tuesday, 24 June 2008 15:49:25 UTC

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