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

Re: Why can minExclusive be equal to maxExclusive?

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 15 Oct 2001 14:54:55 +0100
To: Eric van der Vlist <vdv@dyomedea.com>
Cc: xmlschema-dev@w3.org
Message-ID: <f5br8s52ekw.fsf@cogsci.ed.ac.uk>
Eric van der Vlist <vdv@dyomedea.com> writes:

> "Schema Component Constraint: minExclusive <= maxExclusive
> It is an ·error· for the value specified for ·minExclusive· to be greater than
> the value specified for ·maxExclusive· for the same datatype."
> 
> 
> What's the point of allowing:
> 
> <xs:simpleType name="foo">
>   <xs:restriction base="xs:float">
>    <xs:maxExclusive value="5"/>
>    <xs:minExclusive value="5"/>
>   </xs:restriction>
> </xs:simpleType>
> 
> since the value space of this datatype is empty?

Because it's not egregiously empty.  There are a number of ways whereby
you can write unsatisfiable types (<xs:choice/> is one), that may
arise in the normal course of defining things by restriction.

The WG discussed it for quite a while, IIRC, and decided it would violate the
principle of least surprise to rule this case out.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
Received on Monday, 15 October 2001 09:54:13 GMT

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