Re: name of rdf:nodeID attribute

>>>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 UTC