W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2003

Re: suggestion for next version of XML Schema definition

From: Xan Gregg <Xan.Gregg@jmp.com>
Date: Thu, 28 Aug 2003 11:13:27 -0400
Message-ID: <EFA630DC919FFE4BAF7E353ACB2C0AA1045BD5DE@merc17.na.sas.com>
To: <www-xml-schema-comments@w3.org>
Cc: <Dorrit.H.Gordon@seagate.com>

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:01 UTC