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

Re: min/maxOccurs, can be expressed in a schema?

From: Ian Stuart <Ian.Stuart@ed.ac.uk>
Date: 06 Nov 2001 09:56:56 +0000
To: XML-Schema-dev <xmlschema-dev@w3.org>
Message-Id: <1005040616.12757.9.camel@lucas.ucs.ed.ac.uk>
On Mon, 2001-11-05 at 11:29, Joan Pujol wrote:

> 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?
If you declare two variables - "Foo" and "Bar", then there is no reason
that you can declare "Foo" as a simpleType, which is an [integer], but
with a maxExclusive value of the value of "Bar"

If you want to confuse people, and imply that the maximum is less than
the minimum, just rename "Foo" and "Bar" to be "max" and "min"
repectively :)

Logically, it's do-able. Symantically, it causes problems.

Ian Stuart: Edinburgh University Data Library.
I build things: computer programs (with code); or cars (with metal)

 Personal web site: http://lucas.ucs.ed.ac.uk/ 
Received on Tuesday, 6 November 2001 04:49:24 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:53 UTC