W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2005

Re: [rq23 edits] Re: better names for r:IRI and r:Literal

From: Eric Prud'hommeaux <eric@w3.org>
Date: Sun, 11 Sep 2005 06:32:18 -0400
To: Dan Connolly <connolly@w3.org>
Cc: public-rdf-dawg@w3.org
Message-ID: <20050911103218.GF17622@w3.org>
On Sat, Sep 10, 2005 at 08:44:28AM -0500, Dan Connolly wrote:
> 
> On Sep 10, 2005, at 12:09 AM, Eric Prud'hommeaux wrote:
> 
> >On Mon, Aug 22, 2005 at 01:18:58PM -0500, Dan Connolly wrote:
> >>
> >>On Aug 22, 2005, at 8:20 AM, Eric Prud'hommeaux wrote:
> >>>SPARQL Query Operand Data Types refers to some mythic datatypes r:IRI
> >>>and r:Literal. I would like to change them to rdfs:Resource
> >>> <http://www.w3.org/TR/2004/REC-rdf-schema-20040210/#ch_resource>
> >>
> >>er... changing IRI to Resource is a use/mention switch, no?
> >>
> >>an IRI is a Term, right?
> >>
> >>I suggest xsd:anyURI .
> >>
> >>http://www.w3.org/2001/XMLSchema#anyURI
> >>
> >>documented in http://www.w3.org/TR/xmlschema-2/#anyURI
> >
> >done in 1.487
> >
> >I think you convinced me of this at some point, but I can't remember
> >it. In order to show this off to the WG, I've followed your suggestion
> >and used xsd:anyURI, however, I'm not convinced that the term provides
> >sufficient distinction from run of the mill xsd types. For instance, I
> >would like the following test to not be a cognitive stretch:
> >
> >  _:a  foaf:name       "Alice".
> >  _:a  foaf:mbox       <mailto:alice@work.example> .
> >  _:a  x:mboxStr       "mailto:alice@work.example" .
> >
> > WHERE { ?x x:mboxStr  ?mstr ;
> >            foaf:mbox  ?mbox .
> >         FILTER (?mbox = xsd:anyURI(?mboxStr)) }
                                       ?mstr
 
> That's another use/mention confusion.

I agree, however, I expect that people will presume that there is a
way to construct a resource from the name of the resource.

> xsd:anyURI changes a string into a URI, but doesn't change a URI into
> what the URI refers to. i.e. it changes "mailto:alice@work.example" into
> "mailto:alice@work.example"^^xsd:anyURI. But <mailto:alice@work.example>
> is a different term; it's a term that refers to a mailbox.
> The input and output of xsd:anyURI are both literals; i.e. terms that 
> denote
> themselves. It doesn't output a mailbox, or even a term that refers to 
> a mailbox.
> It's like scheme's symbol->string procedure, not like eval.
> 
> http://www.cs.indiana.edu/scheme-repository/R4RS/r4rs_8.html#SEC49
> 
> 
> As a special case, we decided that str(<uri>) works like log:uri and 
> changes
> levels of denotation going the other way. But we don't have an operator
> that does what log:uri does in the direction from string to what that
> URI denotes.


We did, until I made the r:IRI into an xsd:anyURI. The former was the
name for the symbol, the latter a datatype of that symbol's label.

Looking at the places where xs:anyURI is used, I continue to advocate
for some term to identify (Resources - Literals).  STR takes a node in
the graph and gives you its label. It doesn't take a label and give
you back a label; casting could do that. Likewise, the example for
DATATYPE shows that it returns a node in the graph instead of a label:
      datatype(?size) = xsd:int
  NOT datatype(?size) = "http://...int"^^xsd:anyURI

[RDFS] says
[[
All things described by RDF are called resources, and are instances of
the class rdfs:Resource. This is the class of everything. All other
classes are subclasses of this class.
...
rdfs:Literal is a subclass of rdfs:Resource.
]]
so "123"^^xsd:int is a resource. I didn't reallize this when I
advocated rdfs:Resource. 

Pat, help!

[RDFS] http://www.w3.org/TR/2004/REC-rdf-schema-20040210/#ch_resource
-- 
-eric

office: +81.466.49.1170 W3C, Keio Research Institute at SFC,
                        Shonan Fujisawa Campus, Keio University,
                        5322 Endo, Fujisawa, Kanagawa 252-8520
                        JAPAN
        +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA
cell:   +81.90.6533.3882

(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.

Received on Sunday, 11 September 2005 10:32:24 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:24 GMT