Comment on MinAbsoluteValue/MaxAbsoluteValue

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 UTC