Re: Is minOccurs>maxOccurs Allowed?

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 UTC