Re: Primitive Datatypes of XML Schema (boolean, float, double)

[...]

> (1) boolean datatype (section 3.2.2 of http://www.w3.org/TR/xmlschema-2/)
> 
> I think 'true' and 'false' are not enough for the boolean value space. In
> addition we need at least 'unknown' (similar to NAN for numeric types). This
> value enriches the expressive power of the datatype, and can easily be used
> in boolean computations (e.g. 'true' or 'unknown' evaluates to 'true').
> 
> If we don't have it, there will be cases where we either force arbitrary
> 'true' or 'false' values or bypass boolean by user-defined datatypes with
> richer expressive power.

Check out the 'nullable' functionality in part 1
and see if you think it fits your needs.

http://www.w3.org/TR/1999/WD-xmlschema-1-19991217/#declare-element

The WG considered this sufficient to, for example, bridge the gap to 
SQL, where a boolean field might be null.

otherwise, you can define a 3-member enumeration as a subtype of string
or NMTOKEN for your use.

> (2) float and double datatypes (sections 3.2.3 and 3.2.4 of
> http://www.w3.org/TR/xmlschema-2/)
> 
> It is not clear to me why these two are considered "Primitive Datatypes".
> Why not define a single primitive datatype representing real numbers (the
> mathematical concept), and then derive two (or more) generated datatypes
> according to the needs of IEEE-754 or any other need?
> 
> My feeling is, that the basic datatypes should be as abstract as possible,
> which will increase both their usability (especially by non-programmers) and
> stability (as representation standards change over the years).
[...]

In fact, that's the way a previous version of the specification was
written.
But it doesn't stand up under scrutiny. I'll see if I can find the
details...

-- 
Dan Connolly
http://www.w3.org/People/Connolly/

Received on Thursday, 10 February 2000 17:49:09 UTC