Re: datatypes and RDF Schema

From: Dan Connolly (connolly@w3.org)
Date: 10/04/01


"Peter F. Patel-Schneider" wrote:
[...]
>                         Adding Datatypes to RDF Schema
> 
>                         Peter F. Patel-Schneider
> 
> Here is a method for adding datatypes to RDF Schema that fits well
> with what I see as the RDF Schema philosophy.

Yes and no... it's somewhat appealing, but it conflicts
with a certain amount of deployed code. That's not
necessarily a complete show-stopper, but it's something
that the RDF Core WG is bound to give consideration to.

Hmmm... after mulling it over (details below) I think
I could support this proposal, at from the joint-committee
perspective.

> INTRODUCTION
> 
> First some desiderata:
> 
> 1/ The datatype scheme should be backward compatible with RDF and RDF
>    Schema as they are currently constituted.
> 
>    From this, I get that the following n-triples should still be allowed:
> 
>         John age "5" .
>         John streetAddress "12a" .
>         Mary streetAddress "5" .
> 
> 2/ The datatype scheme should allow type information to be specified in the
>    same way that RDF Schema provides ``type'' information for resources.
> 
>    From this, I get that the following is a (or, perhaps, the) way to
>    specify the type of a literal:
> 
>         Mary age "07" .
>         age rdfs:range ????:integer .
>         John age "05" .

It's a way. As I've said, you can get the same information
without breaking assumptions in deployed code ala:

	Mary age "07".
	age ??:valueProperty ageInt.
	ageInt rdfs:range dt:integer.


> THE PROPOSAL
> 
> The basic idea of the proposal is quite simple.
> 
> 1/ Change the value space for literals from an uninterpreted
>    quasi-character space to the disjoint union of a collection of value
>    spaces.

The status quo for interpreting literals is not "an uninterpreted
quasi-character space." The status quo is just plain unclear.
So just say:

 1/ Decide that the value space for literals is the disjoint union
    of a collection of value spaces.


> 2/ Allow untyped literals to denote any element of this value space for
>    which they are lexical representations.

any? which one? I think a precise formulation is a little
more involved than this, but from the stuff below, I get
the idea...

> 3/ Use special URIs to refer to these value spaces and incorporate their
>    meaning into the meaning of RDF Schema.
> 
> For technical details on one way to do something very close to this, see
> the model theory for DAML+OIL at
>         http://www.daml.org/2001/03/model-theoretic-semantics.html

I looked there several times during the development of DAML+OIL
and never found the explanation
of what's going on here. Could you tell me which text explains
it?


> What sort of URIs and value spaces could be used?  Just about any kind.
> Primitive XML Schema datatypes would work and will be used in the following
> examples.  The mechanism can be extended to all XML Schema datatypes and
> with some extensions probably even to all of XML Schema.
> 
> EXAMPLES AND COMMENTARY
> 
> A n-triple example using XML Schema datatypes:
> 
>         John age "5" .
> 
> All that is known so far is that John's age is some data value that can be
> lexicalized as 5.

i.e.
	(exists (?x) (and (age John ?x) (lexicalRep ?x "5"))
which, I suggest, is more naturally represented as:
	John age _:x.
	_:x lexicalRep "5".

i.e. some folks will see this as putting another
RDF node and arc in the graph. That doesn't bother
me, but it bothers some folks a lot.

but back to your proposal...

>         John streetAddress "05" .
>         Mary streetAddress "5" .
> 
> It is not know yet whether John's age is the same data value as Mary's
> street address.

I'm afraid there's a lot of deployed RDF code that concludes
they're the same. I'm not certain how much, though. It would
be worth collecting some info.

Now literals are in such a state that this sort of mass fix
might be deployable, but I'm not at all sure...

>  Also John and Mary could turn out to have the same
> streetAddress
> 
>         John age "05" .
> 
> It is not known yet whether John has two ages.
> 
>         age rdfs:range xsd:integer .
> 
> Now we know that the two statements about John's age denote the same
> information.
> 
>         streetAddress rdfs:range xsd:string .
> 
> Now we know that John's street address is different from Mary's street
> address.
> 
> An RDF/XML version of more-or-less the above example:
> 
> <rdf:RDF>
> 
> ....
> 
> <rdf:Property rdf:ID="streetAddress">
>   <rdfs:range rdf:resource="xsd:string" />

don't forget that rdf:resource takes a full URI,
not a qname.

> </rdf:Property>
> 
> <Person rdf:ID="John">
>   <age>5</age>
>   <streetAddress>05</streetAddress>
> </Person>
> 
> <Person rdf:ID="Mary">
>   <streetAddress>5</streetAddress>
> </Person>
> 
> <Person rdf:about="John">
>   <age>05</age>
> </Person>
> 
> ....
> 
> <rdf:Property rdf:ID="age">
>   <rdfs:range rdf:resource="xsd:integer" />
> </rdf:Property>
> 
> </rdf:RDF>

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/


This archive was generated by hypermail 2.1.4 : 04/02/02 EST