[Bug 3232] Type versus Datatype

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





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

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

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