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? BenReceived on Friday, 29 April 2011 08:52:32 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 04:55:09 GMT