W3C home > Mailing lists > Public > semantic-web@w3.org > October 2010

Re: Is there a systematic method for naming bnodes?

From: Pierre-Antoine Champin <swlists-040405@champin.net>
Date: Mon, 04 Oct 2010 15:42:01 +0200
Message-ID: <4CA9D9A9.8000200@champin.net>
To: "nathan@webr3.org" <nathan@webr3.org>
CC: Semantic Web <semantic-web@w3.org>
Hi Nathan,

On 04/10/2010 14:33, Nathan wrote:
> Pat Hayes wrote:
>> Well, the very idea of a *blank* node is one that has no name, so this idea seems to be rather against the spirit of the bnode, so to speak. Of course, concrete syntaxes do use bnode identifiers, but these are really just an artifact of the need to represent a graph in a linear character sequence. These bnode identifiers are purely local to the graph. 
> Hmm, does this mean then that often people are using blank nodes as if 
> they have a name, and should this be avoided?
> for example:
>    _:x1 rdf:type ex:Person ; rdfs:label "Nathan"@en .
>    :Bob :knows _:x1 .
>    :Sue :knows _:x1 .
> as far as I know many RDF processors (and indeed common understanding) 
> would treat this as if to say that: "The person that Bob knows called 
> Nathan is the same person that Sue knows called Nathan"

AFAIK, you are right to interpret it that way.

What Pat meant was that the blank node identifier is just a syntactical
artifact; it is not part of the abstract syntax (i.e. the graph). Hence,
the N3 above is *absolutely* equivalent to:

   _:y2 rdf:type ex:Person ; rdfs:label "Nathan"@en .
   :Bob :knows _:y2 .
   :Sue :knows _:y2 .

Indeed, if you parse your N3 snippet (with _:x2) and serialize it again,
you might end up with my N3 snippet (with _:y2).

As a consequence, it is impossible to *reference* the blank node from
outside the graph. It is impossible to state something about "the person
that Nathan named _:x2 in his graph". For that, you need a URI, e.g.:

   <#x1> rdf:type ex:Person ; rdfs:label "Nathan"@en .
   :Bob :knows <#x1> .
   :Sue :knows <#x1> .

 hope this helps


> When it appears that correct interpretation would be "Bob knows a person 
> call Nathan and Sue knows a person called Nathan"
> Thus, am I mistaken, or would it be preferably to write:
>    _:x1 rdf:type ex:Person ; rdfs:label "Nathan"@en .
>    :Bob :knows _:x1 .
>    _:x2 rdf:type ex:Person ; rdfs:label "Nathan"@en .
>    :Sue :knows _:x2 .
> or even:
>    :Bob :knows [ a ex:Person, rdfs:label "Nathan" ]
>    :Sue :knows [ a ex:Person, rdfs:label "Nathan" ]
> And in the case where the person they know is the same person called 
> Nathan, then to give that person a proper name, a URI reference.
> I guess, more tersely, should a blank node reference '_:' ever appear 
> more than once in the object position of a triple? and if it does should 
> parsers create a graph which links both subjects to the same blank node, 
> or produce two different ones?
> Best,
> Nathan
Received on Monday, 4 October 2010 13:42:39 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 08:45:20 UTC