W3C home > Mailing lists > Public > www-rdf-interest@w3.org > September 2002

Re: RDF and XML Schema types

From: Patrick Stickler <patrick.stickler@nokia.com>
Date: Wed, 25 Sep 2002 14:37:04 +0300
Message-ID: <00ca01c26487$df474e30$d74416ac@NOE.Nokia.com>
To: <mbatsis@netsmart.gr>
Cc: "ext Wolfram Conen" <conen@gmx.de>, <www-rdf-interest@w3.org>



[Patrick Stickler, Nokia/Finland, (+358 40) 801 9690, patrick.stickler@nokia.com]


----- Original Message ----- 
From: "ext m batsis" <mbatsis@netsmart.gr>
To: "Patrick Stickler" <patrick.stickler@nokia.com>
Cc: "ext Wolfram Conen" <conen@gmx.de>; <www-rdf-interest@w3.org>
Sent: 24 September, 2002 16:21
Subject: Re: RDF and XML Schema types


> Patrick Stickler wrote:
> 
> >    <#something> 
> >      <#bar> 
> >        <http://www.w3.org/2001/XMLSchema#anyURI>"http://foo.org/blargh" .
> > 
> > Note that the URI of the datatype is directly concatenated to 
> > the unicode string, producing a single label for the datatyped literal
> > node.
> 
> Does this concatenation happen because literals cannot be subjects and 
> thus type information cannot be imported to the actual graph without 
> rdfs:range?

Essentially, yes.

Though there is also benefit in having a single, compact
node that alone denotes the datatype value, rather than
an additional triple defining the type of the literal node.

But, yes, this form is due to the current
restriction on literals from being subjects.

The semantics of 

   <http://..#integer>"10" 

is analogous to the presently illegal triple

   "10" rdf:type <http://..#integer> .

The reason why "10" can't be a subject is because it is not
a globally unambiguous name, so you couldn't know *which*
occurrence of "10" you were talking about. Some other occurrence
might have some other type, such as xsd:string.

> Using my attempt to import the XML Schema datatypes, can't one just 
> infer the type by
> <#bar> <rdfs:range> <xsdt:anyURI>.
> ?

Yes. You can now (finally).

The WG last Friday decided to support this form of global,
property-based datatype assertion, taking inline literals
(e.g. <age>10</age>) to denote values, rather than string
representations. Thus,

   <#bob> <#age> "10" .
   <#age> rdfs:range <http://..#integer> .

entails

   <#bob> <#age> <http://..#xsd:integer>"10" .

I.e. the inline literal node "10" is interpreted as denoting
the integer value ten given the global datatype assertion
defined for the age property.

And, er, if literals could be subjects, then the usual
RDFS closure rule for rdfs:range would apply, i.e.

IF
   ?s ?p ?o .
   ?p rdfs:range ?t .
THEN
   ?o rdf:type ?t .

but of course, it can't, since literals can't be subjects...

There is still ongoing discussion reagarding the optimal
representation of implicitly typed inline literals in
the abstract syntax and in N-Triples, as well as the
implications of this decision on existing applications,
so I won't say more about it just now.

> Bah, n3 confuses me. I need practice...

I found that beer helped me learn N3 alot faster ;-)

Cheers,

Patrick
Received on Wednesday, 25 September 2002 07:38:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:56 GMT