|
[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Ignore Order while validating XSD
From: Philip Aker <philip.aker@shaw.ca>
Date: Mon, 26 Jan 2009 05:14:29 -0800 To: Pete Cordell <petexmldev@codalogic.com> Message-Id: <ABAF1EA6-9E58-4FBC-950B-E23E022F9363@shaw.ca> Cc: xmlschema-dev@w3.org On 2009-01-26, at 04:54:00, Pete Cordell wrote: >> 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. I agree, and many thanks to all those who contributed. Not being an XSD expert, maybe my question is "why can't the content ordering possibilities be specified as a regex-like pattern?". It seems to me it would be more efficient to know the pattern beforehand rather than obtain it from the constituent elements. <xsd:complexType name="brzozowski"> <xsd:collection pattern="(b|c|x){0,}, a{2}, (a|b|c|x){0,}"> <xsd:element ref="my:a"/> <xsd:element ref="my:b"/> <xsd:element ref="my:c"/> <xsd:element ref="my:x"/> </xsd:collection> </xsd:complexType> Philip Aker echo astwta@l...@nl | tr a-z@. p-za-o.@ Democracy: Two wolves and a sheep voting on lunch.Received on Monday, 26 January 2009 13:15:09 GMT |
Subscribe in XML format
|






