names for resources

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. For instance, if I write some XML:
  <foo bar="4" baz=""/>
, validate it by some W3C XML Schema:
  <xs:element name="foo">
      <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 <> (didn't look up the *real* PSVI
projection in to RDF here):
  [ a Element; 
    hasAttribute [ 
      name "bar", 
      value 4 ] ,
    hasAttribute [ 
      name "baz", 
      value <> ] ]
However, this approach require a couple exceptions that I'm not
comfortable with:

In general, datatypes can be transformed with
  STR("asdf"^^foo:bar) = "asdf"
  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(<>) = ""
and maybe DATA
  DATATYPE(<>) = xsd:anyURI
but we don't really "know" the lexical form for URIs so
  ""^^xsd:anyURI != <>

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).
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.

Earlier thread:

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

Feel free to forward this message to any list for any purpose other than
email address distribution.

Received on Sunday, 30 October 2005 09:59:17 UTC