Re: suggestion for next version of XML Schema definition

There is an existing proposal to extend <all> by allowing unrestricted 
use of minOccurs and maxOccurs, so that your sample might become as
follows (changing name & type to ref to help with line wrapping):

<xs:complexType name="FOOTYPE">
  <xs:all>
    <xs:element ref="BAR1" maxOccurs="unbounded"></xs:element>
    <xs:element ref="BAR2" maxOccurs="5"></xs:element>
    <xs:element ref="BAR3" maxOccurs="2"></xs:element>
  </xs:all>
</xs:complexType>

Would that cover the functionality desired by your proposal?

BTW, there was a error in your characterization of <all>
as I read it.  The <all> requires all particles be represented 
in the instance, except where a particle uses minOccurs="0".
From the spec:

  ...informally, the content is *valid* when each declared element
  occurs exactly once (or at most once, if {min occurs} is 0), and
  each is *valid* with respect to its corresponding declaration. The
  elements can occur in arbitrary order.

xan

Received on Thursday, 28 August 2003 11:13:32 UTC