Re: scope of blank node identifiers and multiple graphs

On 30/01/17 16:51, François-Paul Servant wrote:
> Hi,
>
> the spec
> https://www.w3.org/TR/json-ld/#identifying-blank-nodes
> says that
> "The blank node identifier is scoped to the document in which it is used.”
>
> What happens when the same blank node identifier is used within 2 different graphs? There seems to be a conflict (or an ambiguity) with the usual interpretation of blank nodes identifiers in RDF.
>
> Here is a test in the playground (2 blank nodes with same identifier _:b0 in different graphs)
>
> http://json-ld.org/playground/#startTab=tab-normalized&json-ld=%7B%22%40graph%22%3A%5B%7B%22%40id%22%3A%22_%3Ab0%22%2C%22label%22%3A%22label%20of%20anon%20res%20in%20default%20graph%22%7D%2C%7B%22%40graph%22%3A%5B%7B%22%40id%22%3A%22_%3Ab0%22%2C%22label%22%3A%22label%20of%20anon%20res%20in%20graph%202%22%7D%2C%7B%22%40id%22%3A%22http%3A%2F%2Fex.com%2Fs2%22%2C%22p%3A2%22%3A%7B%22%40id%22%3A%22_%3Ab0%22%7D%7D%5D%2C%22%40id%22%3A%22http%3A%2F%2Fex.com%2Fg2%22%7D%2C%7B%22%40id%22%3A%22http%3A%2F%2Fex.com%2Fs%22%2C%22p%22%3A%22_%3Ab0%22%7D%5D%2C%22%40context%22%3A%7B%22p%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fex.com%2Fp%22%2C%22%40type%22%3A%22%40id%22%7D%2C%22label%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23label%22%7D%7D%7D
>
>
> Should the spec be interpreted as saying :
> - there is one thing identified by “_:b0”. All statements in the document involving it refer to the same thing, whatever the @graph they are in
> - there are 2 different things that should not be conflated (RDF point of view, as expressed in the N-Quads output)
> - do what you want, I don’t care, only RDF-minded persons have this kind of concerns ;-)
>
> TIA
>
> fps
>

One document parses to produce one RDF dataset and the blank node should 
be the same where the same identifier is used.

N-Quads:
[[
A fresh RDF blank node is allocated for each unique blank node label in 
a document.
]]
TriG:
[[
A blank node label represents the same blank node throughout the TriG 
document.
]]

Blank nodes can be used as graph names - those are not "in" a graph at all.

One graph can be a subset of another.

     Andy

Received on Monday, 30 January 2017 17:27:29 UTC