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

Re: names for resources

From: Dan Connolly <connolly@w3.org>
Date: Sun, 30 Oct 2005 08:18:44 -0600
To: Eric Prud'hommeaux <eric@w3.org>
Cc: public-rdf-dawg@w3.org
Message-Id: <1130681925.27261.815.camel@dirk>

On Sun, 2005-10-30 at 04:59 -0500, Eric Prud'hommeaux wrote:
> SPARQL differentiates between IRIs, Literals and Blank Nodes. A term
> for IRI shows up in the definition of the isIRI test. STR, as well the
> return type of DATATYPE. Originally, I used terms like "RDF URI" and
> "RDF literal" to define the semantics and return types of functions.
> At some point, I thought it would be a good idea to switch to
> rdfs:Resource and rdfs:Literal. But rdf:Resource is EVERYTHING, so I
> needed another term.
> 
> DanC suggested xsd:anyURI. This promotes all strings of type
> xsd:anyURI to RDF resource.

Everything is an RDF resource. So there's no "promotion".

>  For instance, if I write some XML:
>   <foo bar="4" baz="http://www.w3.org/"/>
> , validate it by some W3C XML Schema:
>   <xs:element name="foo">
>     <xs:complexType>
>       <xs:attribute name="bar" type="xs:integer"/>
>       <xs:attribute name="baz" type="xs:anyURI"/>
> and write out the PSVI as RDF, I am making an assertion about the
> resource <http://www.w3.org/> (didn't look up the *real* PSVI
> projection in to RDF here):
>   [ a Element; 
>     hasAttribute [ 
>       name "bar", 
>       value 4 ] ,
>     hasAttribute [ 
>       name "baz", 
>       value <http://www.w3.org/> ] ]

no, it would be: value "http://www.w3.org/"

    
> However, this approach require a couple exceptions that I'm not
> comfortable with:
> 
> In general, datatypes can be transformed with
> STR:
>   STR("asdf"^^foo:bar) = "asdf"
> DATATYPE:
>   DATATYPE("asdf"^^foo:bar) = foo:bar
> and ^^ casting:
>   "asdf"^^xsd:integer = "asdf"^^xsd:integer
> 
> This (I believe, though this merits a test case) holds for SPARLE terms:
>   STR(4) = "4"
>   DATATYPE(4) = xsd:integer
>   "4"^^xsd:integer = 4
> 
> Some of these functions still work for URIs:
>   STR(<http://www.w3.org/>) = "http://www.w3.org/"
> and maybe DATA
>   DATATYPE(<http://www.w3.org/>) = xsd:anyURI

no; the datatype of W3C's homepage isn't xsd:anyURI. Use/mention bug.

The xsd:anyURI datatype works just like all the others:

DATATYPE("http://www.w3.org/"^^xsd:anyURI) = xsd:anyURI
and
str("http://www.w3.org/"^^xsd:anyURI) = "http://www.w3.org/"


> but we don't really "know" the lexical form for URIs

We know the lexical form for URI literals. URI literals
are self-denoting;t hey work differently from <xyz> symbols.

>  so
>   "http://www.w3.org/"^^xsd:anyURI != <http://www.w3.org/>
> 
> 
> I don't think it's a good idea to invent a term or syntax for this, so
> I'm in favor of going back to a term that's not a URI (RDF Resource).

Which do you mean? URI or Resource? Remember, _everything_ is a
resource.

> There is a precedent for this in SPARQL ("RDF term", "blank node") and
> in XPath Functions and Operators ("numeric").
> 
> 
> I'm on vacation this week in Italy. I'd like to resolve this when I
> get back.

What is it that you'd like to resolve?

> 
> 
> Earlier thread:
>   http://www.w3.org/mid/20050911103218.GF17622@w3.org
-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E
Received on Sunday, 30 October 2005 14:18:56 GMT

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