Re: Scope of blank node labels in TriG/N-Quads

(I did not participate in yesterday's discussion because there was a terrible noise around our building, it even made it difficult to follow the call:-(

I must admit that I was also a little bit uneasy about the shared bnode issue, like Richard was (though not that strongly, my vote was a -0 :-). However... my understanding is (Andy, correct me if I am wrong) that SPARQL has already made a decision, ie, that a blank node id in a SPARQL query/select/update pattern is scoped to the whole pattern, regardless of possible GRAPH usage. 

Although we have not (yet) made a formal decision that TriG should be as compatible to SPARQL as Turtle is, I do believe that should be the case. Ie, if the answer to my previous question is yes, then I firmly believe we should do the same for TriG.

Ivan



On Sep 5, 2012, at 23:26 , Andy Seaborne wrote:

> 
> 
> On 05/09/12 18:36, Richard Cyganiak wrote:
>> Second, separation of inference [1]. This doesn't require sharing of
>> blank nodes in surface syntaxes, but only*within*  a store, so it's
>> not relevant here.
> 
> If you can set the store up with shared bNodes, it's visible outside with existing standards.
> 
> SPARQL 1.0 XML Results can already expose this information to the web.
> 
> Graph 1:
> 
> _:a rdf:type :C1
> 
> and is C1 is subclass of C2:
> 
> Graph 2:
> 
> _:a rdf:type :C1 .
> _:a rdf:type :C2 .
> 
> then
> 
> SELECT ?g ?s ?c { GRAPH ?g { ?s rdf:type ?c} }'
> 
> ==>
> 
> <?xml version="1.0"?>
> <sparql xmlns="http://www.w3.org/2005/sparql-results#">
>  <head>
>    <variable name="s"/>
>    <variable name="c"/>
>  </head>
>  <results>
>    <result>
>      <binding name="g"><uri>http://example/g2</uri></binding>
>      <binding name="s"><bnode>b0</bnode></binding>
>      <binding name="c"><uri>http://example/C2</uri></binding>
>    </result>
>    <result>
>      <binding name="g"><uri>http://example/g2</uri></binding>
>      <binding name="s"><bnode>b0</bnode></binding>
>      <binding name="c"><uri>http://example/C1</uri></binding>
>    </result>
>    <result>
>      <binding name="g"><uri>http://example/g1</uri></binding>
>      <binding name="s"><bnode>b0</bnode></binding>
>      <binding name="c"><uri>http://example/C1</uri></binding>
>    </result>
>  </results>
> </sparql>
> 
> or in JSON (a NOTE from DAWG):
> 
> {
>  "head": {
>    "vars": [ "g" , "s" , "c" ]
>  } ,
>  "results": {
>    "bindings": [
>      {
>        "g": { "type": "uri" , "value": "http://example/g2" } ,
>        "s": { "type": "bnode" , "value": "b0" } ,
>        "c": { "type": "uri" , "value": "http://example/C2" }
>      } ,
>      {
>        "g": { "type": "uri" , "value": "http://example/g2" } ,
>        "s": { "type": "bnode" , "value": "b0" } ,
>        "c": { "type": "uri" , "value": "http://example/C1" }
>      } ,
>      {
>        "g": { "type": "uri" , "value": "http://example/g1" } ,
>        "s": { "type": "bnode" , "value": "b0" } ,
>        "c": { "type": "uri" , "value": "http://example/C1" }
>      }
>    ]
>  }
> }
> 
> 	Andy
> 


----
Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Thursday, 6 September 2012 08:35:16 UTC