Re: datatypes [was Re: Argh!]

From: Sergey Melnik <melnik@db.stanford.edu>
Subject: Re: datatypes [was Re: Argh!]
Date: Mon, 29 Oct 2001 17:40:36 -0800

> "Peter F. Patel-Schneider" wrote:

[...]

> > My model theory states that a literal Peter, as in
> > 
> >         peter name "Peter".
> > 
> > can only denote something that has an XML Schema datatype lexical
> > representation that is the literal "Peter".
> 
> One of the problems is, for example, that XML Schema datatypes are
> "built-in". You can neither construct derived datatypes, nor use
> datatypes defined by other languages. If you do, you would end up with a
> self-morphing model theory. At least, the approach you/Pat described
> would.

Some variants of my scheme use any XML Schema datatype, not just the
primitive ones.  This, of course require an RDF processor to be aware of
the XML Schema language for constructing datatypes (perhaps just to the
point of calling a separate module for datatype purposes).  If you wanted
to use some other language for constructing datatypes you could, but,
again, an RDF processor has to be aware of that language.

> > If Peter Pan is not in the value space of any XML Schema datatype then it
> > cannot be the denotation of a literal.  peter, of course, could denote
> > Peter Pan.  Only if you were using a datatype scheme that had Peter Pan as
> > one of its literal values, and a lexical representation of that literal
> > value was "Peter", could you have "Peter" denote Peter Pan.
> 
> I might want to use a datatype scheme like that! After all, I'd like to
> write "July" and mean month July, right? So if I'm able to introduce a
> type for months, who prevents me from saying that "Peter" should be
> interpreted as Peter Pan?

Nothing, provided that you have some way of creating such a mapping and
some way of having the mapping affect the meaning of RDF literals.

> > Further, if you have
> > 
> >         name rdfs:range xsd:string .
> >         peter name "Peter" .
> > 
> > then the name of peter has to be the string ``Peter''.
> > 
> > More interesting is the following situation:
> > 
> >         peter age "07" .
> >         age rdfs:range xsd:integer .
> > 
> >         susan shoe-size "07" .
> >         shoe-size rdfs:range xsd:string .
> > 
> > Then, indeed, the two occurences of "07" have different denotations, one
> > being the integer 7 and the other being the string ``07''.
> 
> This is what I mean by ambiguity. Recall your "Arghhhh!" reply on the
> top of this message.

But how is this different from having two blank nodes, one of which will
end up as the integer 7 and the other as the string ``07''?

> > Similarly, if
> > all you have is
> > 
> >         mary phone "5824471" .
> > 
> > then you don't know whether mary's phone is the decimal 5 824 471 or the
> > string ``5824471'' or even the floating point number 5824471 (which is
> > different, in XML schema, from the decimal 5 824 471).  There are even
> > other interpretations for mary's phone (such as a URI, I think).
> > 
> > > > If it makes you feel better, you could use a different (but equivalent)
> > > > graph where a literal maps into two nodes.  One node, corresponding to the
> > > > node in Pat's RDF graphs, would be *like* a blank node.  The other node
> > > > would be the ``print-string'' of the first node.  The model theory would
> > > > then constrain the interpretation of the first kind of node by having a
> > > > built-in interpretation of ``print-string''.
> > >
> > > The last sentence stops me from feeling better. If you change it to "The
> > > property that connects the blank node and the ``print-string'' node
> > > constrains the interpretation of the blank node", I would totally
> > > subscribe under the above paragraph.
> > 
> > In my paragraph above ``print-string'' is the relationship between the two
> > nodes.  I didn't want to call it a property.
> 
> That's not what bothers me. Making the blank node in the above example
> to denote the string is what I don't agree with. It denotes something.
> The interpretation of this something is restricted by the attached
> ``print-string''.

Sure, isn't that what I said.  (I think that Pat may be trying to create a
model theory where the ``blank'' node has an ``intermediate'' denotation
that is the string, but that is not the way I would do things.)

> > > > Why use Pat's RDF graphs instead of these graphs?  Two reasons:
> > > > 1/ Pat's RDF graphs are closer to RDF M&S.
> > >
> > > Graphs are graphs, and are as close to graphs, as any other graphs. I
> > > don't buy that Pat's *interpretation* of those graphs is closer to M&S -
> > > I believe the opposite.
> > 
> > How can you say this?
> > 
> > The first example in M&S is
> > 
> >         http://www.w3.org/Home/Lassila Creator "Ora Lassila" .
> 
> Do you think this example is ok? So, who is the "Creator" of the Web
> page in the above example, after all? Peter Pan? According to your
> proposal, the Creator would be an xsd:string as defined in the XML
> Schema.

Sure, if that is what Creator is supposed to be.  If Creator is not
supposed to be a string, then use another type.  If Creator is supposed to
be a regular resource, then don't use a literal.

> > Further, I see many RDF ``documents'' that have things like
> > 
> >         john name "John" .
> >         john age "07" .
> 
> The first statement is fine, IMO. Property "name" could be thought of as
> a relationship between Persons and 
> Literals. A concept of a "name" could be stretched to that of a
> character string. The second statement I'd consider bad modeling
> practice. And in the long run we won't do ourselves a favor by endorsing
> it.

My guess is that you are arguing for the use of a unit theory here.  (I'm
not sure if ``unit theory'' is the right name.  What I mean is the thing
that I learned in school when I tried to multiply speed times distance and
come up with time.)  OK, then, how about

	john number_of_sisters "02" .

[...]

> Sergey

peter

PS:  Perhaps we should take this discussion off rdfcore-wg.  I'm even a bit
astonished that I can post to it.  (However, I do like to go by the rule that
if it is possible, then it is permitted.  :-)

Received on Monday, 29 October 2001 21:46:14 UTC