W3C home > Mailing lists > Public > www-rdf-comments@w3.org > January to March 2003

Re: name of rdf:nodeID attribute

From: Dave Beckett <dave.beckett@bristol.ac.uk>
Date: Tue, 14 Jan 2003 18:32:24 +0000
To: Garret Wilson <garret@globalmentor.com>
cc: www-rdf-comments@w3.org
Message-ID: <27171.1042569144@hoth.ilrt.bris.ac.uk>

>>>Garret Wilson said:
> Dave,
> 
> Dave Beckett wrote:
> > In RDF you never define identifiers, you are always using them for
> > nodes (or arcs) in triples of the RDF graph.
> [cut]
> > I think we considered making two attributes for rdf:nodeID but given
> > the experience that people cannot seem to remember when to use
> > rdf:about or rdf:resource, it made more sense and was a smaller
> > change to add a single attribute.   This seems to have worked out
> > fine.  nodeID and nodeIDref would bring no benefits and would likely
> > just repeat the rdf:about/rdf:resource confusion.
> 
> In that case, is this possible?
> 
> <rdf:Description>
>    <ex:editor rdf:nodeID="abc">
>      <ex:homePage rdf:resource="http://purl.org/net/dajobe/"/>
>    </ex:editor>
> </rdf:Description>

Not quite, you broke the node element / property element striping
there so the innermost ex:homePage is a node element and doesn't take
rdf:resource, does take an rdf:about (see I said it was confusing!).

The rdf:nodeID on the ex:editor property element defines the object
of the statement including that element, so the innermost ex:homePage
is also illegal here for that reason too.

If you meant:
  <ex:editor rdf:nodeID="abc">
    <ex:homePage rdf:resource="http://purl.org/net/dajobe/"/>
  </ex:editor>

that is fine giving N-triples something like:

_:abc <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/stuff/1.0/editor> .
_:abc <http://example.org/stuff/1.0/homePage> <http://purl.org/net/dajobe/> .

(assuming rdf: and ex: are defined as usual)

> What about this?
> 
> <rdf:Description>
>    <ex:editor rdf:nodeID="abc" ex:fullName="Dave Beckett"/>
> </rdf:Description>

Sure:

_:abc <http://example.org/stuff/1.0/fullName> "Dave Beckett" .
_:genid1 <http://example.org/stuff/1.0/editor> _:abc .

> If rdf:nodeID is just a placeholder in a graph (and can be a subject, 
> object, or both at the same time), both of these examples should be 
> valid. If rdf:nodeID can only represent one or the other at a time 
> (analogous to rdf:about for the subject and rdf:resource for the 
> object), then they serve two separate purposes and should be named 
> accordingly.

rdf:nodeID is not in the graph at all.  It is a bit of syntax that
enables you to give a node in an RDF graph a graph-local identifier,
in the same way that rdf:about and rdf:resource enable you to give
them URI-references (for subject, object of a triple respectively).

You really can change any RDF/XML with rdf:about and/or rdf:resource
attributes to use rdf:nodeID and that is ok.

Dave
Received on Tuesday, 14 January 2003 13:33:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 21 September 2012 14:16:31 GMT