W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

Re: min/maxOccurs in group ref

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 31 Oct 2001 17:55:23 +0000
Message-ID: <17916075575.20011031175523@jenitennison.com>
To: kboo@ca.ibm.com
CC: xmlschema-dev@w3.org
Hi Kihup,

> In the following, minOccurs > maxOccurs.
> ...
> <xsd:group ref="MyGroup" minOccurs="5" maxOccurs="2"/>
> ...
> Is this supposed to be invalid?
> Or, is validation done only on the instance documents?

This is invalid in the schema according to 2.1 of the following:

  Schema Component Constraint: Particle Correct

  All of the following must be true:
  1 The values of the properties of a particle must be as described
    in the property tableau in The Particle Schema Component (3.9.1),
    modulo the impact of Missing Sub-components (5.3).
  2 If {max occurs} is not unbounded, that is, it has a numeric
    value, then all of the following must be true:
    2.1 {min occurs} must not be greater than {max occurs}.
    2.2 {max occurs} must be greater than or equal to 1.

               From: http://www.w3.org/TR/xmlschema-1/#p-props-correct

So a validator should complain when it sees this in the schema.


Jeni Tennison
Received on Wednesday, 31 October 2001 12:55:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:55 UTC