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

Re: restriction

From: Jeni Tennison <jeni@jenitennison.com>
Date: Mon, 21 Jan 2002 11:44:49 +0000
Message-ID: <10073951857.20020121114449@jenitennison.com>
To: Oleg Tkachenko <olegt@multiconn.com>
CC: xmlschema-dev@w3.org
Hi Oleg,

> How can I restrict the following type to be "to" value >= "from"
> value?
> <xs:complexType name="unboundedRangeType">
>         <xs:all>
>                 <xs:element name="from" type="xs:unsignedLong" />
>                 <xs:element name="to" type="xs:unsignedLong" />
>         </xs:all>
> </xs:complexType>

This is an example of a "co-occurrence constraint". XML Schema cannot
articulate most co-occurrence constraints, including this one, so you
have to use another schema language instead. For this particular
co-occurrence constraint, you'd be best off with a language such as
Schematron or Examplotron that uses XPath to articulate low-level



Jeni Tennison
Received on Monday, 21 January 2002 06:44:52 UTC

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