W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2002

Re: Is minOccurs>maxOccurs Allowed?

From: Jeni Tennison <jeni@jenitennison.com>
Date: Thu, 13 Jun 2002 14:31:31 +0100
Message-ID: <107-2140240643.20020613143131@jenitennison.com>
To: xmlschema-dev@w3.org, x "Dwivedi , Ajay Kumar" <AjayKumar.Dwivedi@dresdner-bank.com>

Hi Ajay,

> Is a particle with minOccurs > maxOccurs valid?

No. The second clause of Schema Component Constraint: Particle Correct
states:

  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.

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

When moving from an XML representation of a particle to the particle
schema component, the {min occurs} property is taken directly as the
value of the minOccurs attribute -- it isn't altered to bring it into
line with the maxOccurs attribute.
                     
Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Thursday, 13 June 2002 09:31:33 GMT

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