This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 3023 - R-203: Inconsistency with constraints on min/maxExclusive (1.0)
Summary: R-203: Inconsistency with constraints on min/maxExclusive (1.0)
Status: NEW
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Datatypes: XSD Part 2 (show other bugs)
Version: 1.0 only
Hardware: PC Windows 3.1
: P2 normal
Target Milestone: ---
Assignee: David Ezell
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords: needsDrafting
Depends on:
Blocks:
 
Reported: 2006-03-21 00:23 UTC by C. M. Sperberg-McQueen
Modified: 2012-12-04 00:51 UTC (History)
0 users

See Also:


Attachments

Description C. M. Sperberg-McQueen 2006-03-21 00:23:51 UTC
This was originally raised by Sandy Gao in 2003 
(http://lists.w3.org/Archives/Public/www-xml-schema-comments/2003JanMar/0037.html).
The 1.1 version of the issue is bug 1893; this is the 1.0 version
of the bug.

The Schema Component Constraint "minExclusive valid restriction"
says:

    It is an error if any of the following conditions is true:
      ...
      2 maxInclusive is among the members of {facets} of {base
        type definition} and {value} is greater the {value} of
        the parent maxInclusive

So it's an error for minEx > base.maxIn, which implies 
minEx <= base.maxIn (if minEx == maxIn, it results in an empty 
value space)

The Schema Component Constraint "maxExclusive valid restriction"
says:

    It is an error if any of the following conditions is true:
      ...
      3 minInclusive is among the members of {facets} of {base
        type definition} and {value} is less than or equal to the
        {value} of the parent minInclusive 

So it's an error for maxEx <= base.minIn, which implies 
maxEx > base.minIn

Isn't this inconsistent? Shouldn't this be either: 

    minEx < base.maxIn && maxEx > base.minIn 

or 

    minEx <= base.maxIn && maxEx >= base.minIn 

The issue has been discussed periodically.

In the telcon of 2005-09-23, it was resolved to classify this
issue [bug 1893] as error with corrigendum against 1.0, but ask
implementors which way they resolved the inconsistency before
deciding how to resolve this.

The 1.1 version of this issue (bug 1893) was resolved in the face
to face meeting of January 2006 in St Petersburg, Florida, when
the WG adopted a proposal to change (in 1.1) the relevant part of
section 4.3.9.4 to read:

   Schema Component Constraint: minExclusive valid restriction
   It is an ·error· if any of the following conditions is true:
     1 minExclusive is among the members of {facets} of {base type
       definition} and {value} is less than the {value} of that
       minExclusive.
     2 minInclusive is among the members of {facets} of {base type
       definition} and {value} is less than the {value} of that
       minInclusive.
     3 maxInclusive is among the members of {facets} of {base type
       definition} and {value} is greater than or equal to the
       {value} of that maxInclusive.
     4 maxExclusive is among the members of {facets} of {base type
       definition} and {value} is greater than or equal to the
       {value} of that maxExclusive.

The changed wording appears in the Last Call draft of XML Schema 1.1
published in February 2006.