[Bug 3232] Type versus Datatype

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3232





------- Comment #6 from davep@iit.edu  2008-02-05 19:52 -------
(In reply to comment #4)

>Well, I don't see it that way at all. When I define a simpleType by restriction
>from xs:integer, I'm not defining a subclass of elements. The simpleType might
>never be used as the type of an element, or for that matter an attribute. It
>might only be used as the type of an XQuery function parameter, for example.

I'd say you're not defining simple types by restriction, you're defining
datatypes by restriction.  I don't like conflating the two terms--that does get
confusing.  I'd like to keep "simple type" and "complex type" as parallel
things; I don't see an analog for "complex type" as a mathematical
structure/system.

(In reply to comment #5)
> Michael Kay writes:
> 
> > As far as I can see, the words "datatype"
> > and "simple type" are pure synonyms.
> 
> I always found the distinction confusing, but I vaguely recall that there is
> one.  Or, stated differently, I vaguely recall that when this question came up
> a few years ago that a resolution was proposed.  I >think< it was:
> 
> Simple Type: The combination of a lexical space, a value space, definitions of
> certain relations like equality, and maybe a few other things I'm forgetting.

Backwards.  That's a datatype.

> Datatype: A component in the schema component graph, typically used to specify
> the definition of a Simple Type through use of facets.

And that's a simple type *definition*.

> That said, I was never terribly optimistic that users would like or remember
> this distinction.  I'm not particularly an advocate for this terminology, but
> neither did I object strongly nor have sufficiently better alternatives to
> propose.  Anyway, that's my somewhat hazy recollection of what the difference
> was supposed to be.   Can anyone verify that I do or don't have this right? 

See above.  As far as I know, we do not anywhere define "simple type" (as
opposed to "simple type definition") or "complex type" (as opposed to "complex
type definition").  I've tried to use "simple type" and "complex type" as
analogs of SGML's "element type" (since the STD/CTDs are analogs of SGML's
element type definitions--which are misnamed "element definitions" in XML), and
in accordance with what I take to be at least one version of common usage in
the OO community.

AFAIK, "datatype" used as I've used it in Part 2 is rather standard CS
terminology for things like that. 

Received on Tuesday, 5 February 2008 19:52:22 UTC