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.
               
Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Wednesday, 31 October 2001 12:55:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:24 GMT