Re: restriction

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
rules.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

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