Re: Scope of blank nodes in RDF

Antoine,

On 6 Sep 2012, at 16:43, Antoine Zimmermann wrote:
>> RDF documents, RDF graphs and RDF datasets can all be seen as static
>> snapshots. Any blank nodes mentioned are distinct from any those
>> mentioned in any other static snapshot.
> 
> Where did you see this?
> 
> if you have an RDF document that contains:
> 
> []  :prop  1 .
> 
> and I have another document with:
> 
> []  :prop  2 .
> 
> it is possible that your document is serialising the first triple of a graph like this (represented in Turtle for convenience):
> 
> []  :prop  1, 2 .
> 
> and that I am serialising the second triple of it. So we are using the same bnode.

Yes. But when you parse your document, you get a fresh blank node that's not the one that was in the original graph. And when you parse my document, you get yet another fresh blank node different from both.

In other words, parsing always creates fresh blank nodes.

And, actually, parsing the same g-text twice creates two separate sets of fresh blank nodes. This is all very weird, but it's the only way how I can make sense of what actually happens as the specs are written and implemented. Parsing a g-text to a g-snap is not idempotent... ಠ_ಠ

Coming back to your example, I think it is safe to say that the two documents, for all intents and purposes, serialize different blank nodes. If we said that they serialize the same blank node, then that knowledge would be lost when we parse them, because there's no way you could read the Turtle spec as saying that you end up with the same blank node from both g-texts.

Best,
Richard

Received on Thursday, 6 September 2012 21:14:22 UTC