Re: Explicit RDF property for "literal has datatype D"?

2009-07-06 17:24 Toby A Inkster <mail@tobyinkster.co.uk>:
> On 6 Jul 2009, at 15:53, Toby A Inkster wrote:
> > In terms of RDF, this can't be done. Well, the property could be
> > defined using RDFS, but it could never legally be used. The
> > definition would imply that "p" is used like so:
> >
> > 	"2008-01-01" p xsd:date .
>
> Forgot to mention... (somewhat perversely) the inverse is fine and
> dandy!
>
> ex:isDatatypeOf
> 	rdfs:domain rdfs:Datatype ;
> 	rdfs:range rdfs:Literal .
>
> xsd:date ex:isDatatypeOf "2008-01-01" , "2008-01-02" .

Indeed, Toby -- but then, one wouldn't be able to express the fact that
xsd:date is the datatype of the object of the triple

something dc:date "2008-01-01".

because the two literals "2008-01-01" merely have equal values, but there is
no notion of identity, as for resources.

Nevertheless, this restriction of RDF does not occur in my actual situation.
In the language that we are using to decorate ontologies, there is a facility
for annotating literals with further metadata (because the language has a
non-RDF origin; cf.  https://trac.kwarc.info/krextor/ticket/52). In _that_
place, I'd like to put the datatype information as a key/value pair, and now I
just need to come up with a good name for the key.

BTW, given that there is the class rdfs:Literal and the pseudo-attribe
rdf:value, which can be used creatively anyway
(http://www.w3.org/TR/2004/REC-rdf-primer-20040210/#rdfvalue), it would
actually be possible to model literals and datatypes as normal RDF triples:

y dc:date x .

x a rdfs:Literal ;
  rdf:value "2008-01-01";
  ex:datatype xsd:date .

Cheers,

Christoph

-- 
Christoph Lange, Jacobs Univ. Bremen, http://kwarc.info/clange, Skype duke4701

Received on Monday, 6 July 2009 16:07:31 UTC