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

Re: Ignore Order while validating XSD

From: Pete Cordell <petexmldev@codalogic.com>
Date: Mon, 26 Jan 2009 12:54:00 -0000
Message-ID: <EDC2044363744D4EA5AF4010F6E302C5@Codalogic>
To: "Philip Aker" <philip.aker@shaw.ca>, <xmlschema-dev@w3.org>

> Original Message From: "Philip Aker"

As you may know, in XSD 1.1 the constraints on xs:all have been relaxed so 
you will actually be able to do:

  <xs:complexType>
    <xs:all>
      <xs:element name="a" maxOccurs="unbounded"/>
      <xs:element name="b" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element name="c" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element name="x" minOccurs="0" maxOccurs="unbounded"/>
    </xs:choice>
  </xs:complexType>

XSD1.1 hasn't been released yet, but it shows things are moving in a 
suitable direction.

HTH,

Pete Cordell
Codalogic Ltd
Interface XML to C++ the easy way using XML C++
data binding to convert XSD schemas to C++ classes.
Visit http://codalogic.com/lmx/ for more info

> On 2009-01-25, at 16:37:55, C. M. Sperberg-McQueen wrote:
>
>> In a conventional regular expression, you might write
>
>> (b|c|x)*, a, (a|b|c|x)*
>
> <xsd:complexType name="brzozowski">
>  <xsd:array pattern="(b|c|x)*, a{2}, (a|b|c|x)*">
>   <xsd:element ref="my:a"/>
>   <xsd:element ref="my:b"/>
>   <xsd:element ref="my:c"/>
>   <xsd:element ref="my:x"/>
>  </xsd:array>
> </xsd:complexType>
>
> Wish it could be that easy.
>
>
> Philip Aker
> echo astwta@lvpc.dslh@nl | tr a-z@. p-za-o.@
>
> Democracy: Two wolves and a sheep voting on lunch.
>
>
>
> 
Received on Monday, 26 January 2009 12:54:44 UTC

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