W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 1999

Comment on MinAbsoluteValue/MaxAbsoluteValue

From: Arnold, Curt <Curt.Arnold@hyprotech.com>
Date: Tue, 28 Sep 1999 09:25:41 -0600
Message-ID: <61DAD58E8F4ED211AC8400A0C9B468731AAFA9@THOR>
To: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
I understand the motiviation behind these and I think they embody a
legitimate need, however I think it would be better addressed in the context
of application constraints instead of schema constraints which I will try to
elaborate.

The MinInclusive, MinExclusive, MaxInclusive, and MaxExclusive are used to
express true boundaries in the system being modelled.  In the following
example, the minExclusive facet reflects the physical impossibility of
obtaining a pressure of zero.

<datatype name="Pressure">
	<basetype name="real"/>
	<minExclusive>0</minExclusive>
</datatype>

On the other hand, the only use I can see for the <minAbsoluteValue> is to
capture a limitation of one application (and maybe on one specific platform)
and not of the underlying physical system.  In the following example, the
Angle datatype is constrained to the limits of the IEEE 32-bit floating
point representation.

<datatype name="Angle">
<minAbsoluteValue> 1.40239846e-45 </minAbsoluteValue> <maxAbsoluteValue>
3.40282347e38 </maxAbsoluteValue> 
</datatype>

There is no physical limit that would prevent me from obtaining an angle of
1e-46.  In addition, I assume that you are expecting to allow an explicit
zero value in addition to the values between the min and max absolute, so
unless you are going to argue quantum effects, there will exist in time an
instant as something rotates through zero that its angle would be 1e-46.

However, the min/max absolute values do hint at a legitimate need that
hasn't been addressed in the schema draft yet.  Basically, a way to describe
the limitations of an XML consumer using XML Schema constructs.  In a better
example, say I have developed a schema for addresses that supports both US
and foreign addresses and I have an XML consumer (say a postage calculator)
that only supports US addresses and requires a zip code.  I would not want
to cripple my schema by adding a schema constraint that a zip code is
required, but I would like to express an application constraint that zip
code is required so that non-US addresses would be indentified by the XML
processor and not require application logic.  This would allow some router
that had the application constraint schemas to dispatch messages to the
appropriate "postage calculators" without replicating application logic.
Received on Tuesday, 28 September 1999 11:27:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:46 GMT