Sunday, December 11, 2011

XSD: elements in arbitrary order

my situation is that I have child elements which can occur repeatedly in any order:


Googling around I find this solution:

<xs:complextype mixed="true" name="p">
 <xs:choice maxoccurs="unbounded" minoccurs="0">
  <xs:element name="a">
  <xs:element name="b">

 it seems to work pretty well...

my wish is that XSD contained a native construct like "anyorder", similar to "sequence" or "choice" or "all"

No comments: