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

min/maxOccurs, can be expressed in a schema?

From: Joan Pujol <joan.pujol@ima.udg.es>
Date: Mon, 05 Nov 2001 12:29:45 +0100
Message-ID: <3BE67829.DED594A0@ima.udg.es>
To: xmlschema-dev@w3.org
One question,

Jeni Tennison wrote:
> 
> 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.

Hi,

One question, this type of restrictions can be done with schemas?
Or must be done in a post-schema validation?
For example if I declare two attributes named min and max, can I control that
max<=min with a schema?


-- 
---
Joan Jesús Pujol Espinar
PTS Sistemes Departament IMA
Received on Tuesday, 6 November 2001 03:17:59 GMT

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