W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2002

Re: Possible errors in minExclusive and maxExclusive relative to fixed

From: Martin Gudgin <marting@develop.com>
Date: Thu, 7 Feb 2002 15:54:05 -0000
Message-ID: <00fb01c1afef$ae07b5f0$977ba8c0@greyarea>
To: <www-xml-schema-comments@w3.org>, "G. Ken Holman" <gkholman@CraneSoftwrights.com>
Ken,

I *think* you are thinking below about instances. If I have misunderstood
your question/observation please can you restate it...

In 4.3.8.1[1] and 4.3.9.1[2] the spec is talking about when a derived type
is defined, not about the values in instance infosets. The constraint that a
value must be greater ( or less ) than the exclusive constraint applies to
instance infosets, it doesn't apply directly when doing type derivation.

It is perfectly coherent ( if a little redundant ) for a derived type
definition to specify a maxExclusive or minExclusive that has the same value
as the base type.

e.g.

<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'
           xmlns:tns='urn:example-org:temps'
           targetNamespace='urn:example-org:temps' >


  <xs:simpleType name='Celcius' >
    <xs:restriction base='xs:decimal' >
      <xs:minExclusive value='-273' fixed='true' />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name='IceTemps' >
    <xs:restriction base='tns:Celcius' >
      <xs:minExclusive value='-273' />
      <xs:maxInclusive value='0' />
    </xs:restriction>
  </xs:simpleType>

</xs:schema>


Value space of Celcius type is -273 ( exclusive ) to +Infinity
Value space of IceTemps type is -273 ( exclusive ) to 0

Of course, this Celcius type is less useful because I cannot derive
WaterTemps and StreamTemps from it....

Regards

Martin Gudgin

[1] http://www.w3.org/TR/xmlschema-2/#rf-maxExclusive
[2] http://www.w3.org/TR/xmlschema-2/#rf-minExclusive



----- Original Message -----
From: "G. Ken Holman" <gkholman@CraneSoftwrights.com>
To: <www-xml-schema-comments@w3.org>
Sent: Wednesday, February 06, 2002 8:15 PM
Subject: Possible errors in minExclusive and maxExclusive relative to fixed


> Hi folks, my name is Ken and I develop XML-related training material.
I've
> been involved in XML since the start in Jon's "special interest group" and
> I'm now working on two new deliveries that include W3C XML Schema:
>
>    http://www.CraneSoftwrights.com/schedule.htm#i2xim
>    http://www.CraneSoftwrights.com/schedule.htm#pxim
>
> Going through "Part 2 Datatypes" with a fine-toothed-comb, I found
> something that didn't sit right with me.
>
> Trying to look into the archives of
> http://lists.w3.org/Archives/Public/www-xml-schema-comments/ I get the
> following error:
>
>    An HTTP error occured while getting the requested URI.
>    Generated by http://search.w3.org/
>
> ... so I apologize in advance if this has been discussed.
>
> Looking at the errata I also don't see this issue discussed.
>
> I think these are "Error" type fixes and neither "Editorial" or
> "Clarification".
>
> Section 4.3.8.1 states: If {fixed} is true, then types for which the
> current type is the {base type definition} cannot specify a value for
> maxExclusive other than {value}.
>
> Problem: if {value} is specified for maxExclusive it violates the
> constraint of being exclusively less than the specified max value because
> it is equal.
>
> Section 4.3.9.1 states: If {fixed} is true, then types for which the
> current type is the {base type definition} cannot specify a value for
> minExclusive other than {value}.
>
> Problem: if {value} is specified for minExclusive it violates the
> constraint of being exclusively greater than the specified max value
> because it is equal.
>
> Possible action:
>
> Since both 4.3.8.2 and 4.3.9.2 indicate that the boolean value for "fixed"
> appears to be fixed at "false", then the problem sentences should just be
> removed since they are moot and would never apply.
>
> Actually does that then make this an editorial change?
>
> I hope this makes sense; please let me know if you have any questions.
>
> Thanks!
>
> .................. Ken
>
>
> --
> Upcoming: 3-days XSLT/XPath and/or 2-days XSLFO - Feb 18-22, 2002
>
> G. Ken Holman                mailto:gkholman@CraneSoftwrights.com
> Crane Softwrights Ltd.         http://www.CraneSoftwrights.com/m/
> Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995)
> ISBN 0-13-065196-6                        Definitive XSLT & XPath
> ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
> ISBN 1-894049-07-1               Practical Formatting Using XSLFO
> XSL/XML/DSSSL/SGML/OmniMark services, books(electronic, printed),
> articles, training(instructor-live,Internet-live,web/CD,licensed)
> Next public training:  02-02-11,12,14,15,18,21,03-04,05,06,08,11,
> -                                04-08,09,10,12,05-14,15,06-04,07
>
Received on Thursday, 7 February 2002 10:55:10 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:33 UTC