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 21:51:32 +0000
To: www-xml-schema-comments@w3.org
Message-Id: <E1JMVhU-0001X5-9w@wiggum.w3.org>


------- Comment #10 from davep@iit.edu  2008-02-05 21:51 -------
(In reply to comment #9)
> I believe that a complex type definition defines a complex type. I think I know
> what a complex type is: it is a set of rules that can be used to constrain the
> contents of XML elements. 
> Similarly I believe that a simple type definition defines a simple type; and a
> simple type is a set of rules that can be used, inter alia, to constrain the
> contents of XML elements and attributes. 

Good.  We agree.  Now what then does a simple type have to do with mathematical

> I know what datatypes are as a generic computer science term, but I don't know
> what they are in XML Schema, other than another name for simple types. Your
> last comment appears to agree with that.

In my last comment, I said "it defines both".  If they were both the same
thing, I wouldn't say that.  I guess appearances are in the eye of the

What can I say to get it across that in XML Schema, datatypes *are* those
things that you see going by that name in computer science?  And they are *not*
used simply "to constrain the contents of XML elements and attributes", except
as the XML Schema rules for validity using simple type definitions call upon
the corresponding datatype for some calculations.

> I don't think we have to resort to concepts like "element class" - we have
> quite enough concepts already without inventing more.

Fear not; I wouldn't think of introducing it into the spec.  I'm just using it
here to show where my interpretations of "simple type" (and "complex type")
come from, and why I see them as different animals from "datatype".  We've not
defined either of these and we've tried to root out any occurrences of them
(without the appended "definition") in the spec itself.  For better or for
worse; maybe we should have defined them just so people wouldn't wonder why we
call the things that we do "datatypes"--but I'm aware of no plan to do so.
Received on Tuesday, 5 February 2008 21:51:39 UTC

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