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

[Bug 3232] Type versus Datatype

From: <bugzilla@wiggum.w3.org>
Date: Tue, 05 Feb 2008 19:52:14 +0000
To: www-xml-schema-comments@w3.org
Message-Id: <E1JMTq2-0005MB-Ty@wiggum.w3.org>


------- 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

(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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:07 UTC