W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > April 2011

Re: Issue on comparing BlankNodes in the RDF API

From: Nathan <nathan@webr3.org>
Date: Thu, 28 Apr 2011 20:44:56 +0100
Message-ID: <4DB9C3B8.2060804@webr3.org>
To: Benjamin Adrian <benjamin.horak@gmail.com>
CC: RDFa WG <public-rdfa-wg@w3.org>, Manu Sporny <msporny@digitalbazaar.com>, Ivan Herman <ivan@w3.org>
Benjamin Adrian wrote:
> Am 28.04.2011 20:31, schrieb Nathan:
>>> So what is the problem?
>> I checked my libs (after wondering why this wasn't a problem for me) and
>> found that I had implemented as follows:
>>   this.value = "_:b".concat(++api.BlankNode.NEXTID)
>> that's inside the blank node constructor, then the equality test just
>> checks if the values are equal.
>> this gaurantees that each blank node in the environment has a unique id,
>> and that two blank nodes are equal within that environment if they have
>> the same id.
>> certainly never had any problems with it (and I have used the code
>> heavily), and it's also the way tabulator is implemented.
>> likewise as per Ivan's note on references, two blank nodes are the same
>> with a normal == test, since they can only be the same blank node if
>> they are references to the same object.
> This means if we assume two graphs:
> graph A: _:0 rdfs:label "Nathan" .
> graph B: _:1 rdfs:label "Nathan" .
> The graphs are unequal. When merging A and B the resulting graph C is:
> graph C: _:0 rdfs:label "Nathan" .
>          _:1 rdfs:label "Nathan" .
> I don't know, is this conform to the RDF semantics?

This is why we need the RDF entailments and definitions as per the RDF 
Semantics, it's not really something we can cover without them, consider:

Graph A:  _:0 a :Woman .
           _:0 :name "Jamie" .
Graph B:  _:1 a :Man .
           _:1 :name "Jamie" .

When you look at only the triples, then it would seem reasonable to 
remove [] :name "Jamie" in the merge. When really it is not, because we 
are not saying "something exists that is a Woman", "something exists 
that is a Man" and "something exists with name of Jamie"; but rather 
that "something exists which is a Woman and has a name of Jamie" 
"something exists which is a Man and has a name of Jamie".


Received on Thursday, 28 April 2011 19:45:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:19:51 UTC