W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2010

Re: RE: Difficult logical relationship in complex type

From: Cheney, Edward A SSG RES USAR <austin.cheney@us.army.mil>
Date: Wed, 25 Aug 2010 11:23:10 -0500
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Message-ID: <f70ed7f0b577.4c74fd1e@us.army.mil>
Here is what I would do:

<xs:complexType>
  <xs:choice>
    <xs:choice>
      <xs:choice maxOccurs="unbounded">
        <xs:element ref="b"/>
        <xs:element ref="c"/>
        <xs:element ref="d"/>
      </xs:choice>
      <xs:element ref="a"/minOccurs="0" maxOccurs="unbounded"/>
    </xs:choice>
    <xs:choice maxOccurs="unbounded">
      <xs:element ref="b"/>
      <xs:element ref="c"/>
      <xs:element ref="d"/>
    </xs:choice>
  </xs:choice>
</xs:complexType>

Does that satisfy the requirements?  If that does not work please let me know what are the additional requirements I am sure I can find a way to make it work even if it does become a bit lengthy.

Austin
http://prettydiff.com/
Received on Wednesday, 25 August 2010 16:23:49 UTC

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