Re: Indicating bNodes in XML result sets

Dave Beckett wrote:
> On Thu, 11 Nov 2004 11:49:53 +0000, "Seaborne, Andy" <andy.seaborne@hp.com> wrote:
> 
> 
>>In http://lists.w3.org/Archives/Public/public-rdf-dawg/2004JulSep/0556
>>Dave indicated his preference for the XML form of the result set to look like:
>>http://lists.w3.org/Archives/Public/public-rdf-dawg/2004JulSep/att-0556/result1.xml
>>
>>This may have been covered but, if so, I have forgotten - what happnes 
>>about bNodes in results?
>>
>>If we have the query:
>>
>>SELECT ?x ?name WHERE (?x rdf:type foaf:Person) (?x foaf:name ?name)
>>
>>then there are distinct solutions for ?x with bNodes.  This should be 
>>indicated in the results - this is not letting bNodes out of the graph, it 
>>just allows the app to see distinguish between bNodes, or see they are the 
>>same, within the result set.
>>
>>I suggest having document-scoped ids (c.f. RDF/XML) that indicate there 
>>were bNodes.  This means that each unique result is still unique.  Such an 
>>id is not related to the internal bNode labels in the data graph.
> 
> 
> That seems the best way to handle it.
> 
> 
> 
>>So we might have two 'name's being the same:
>>
>><results>
>>   <result>
>>     <x node="foo">
>>     <name>Fido</name>
>>   </result>
>>   <result>
>>     <x node="bar">
>>     <name>Fido</name>
>>    </result>
>></results>
>>
>>(I don't care much about the attribute name - rdf:ID?)
> 
> 
> nodeID maybe
> 
> 
> 
>>The RDF form of the result sets can do this by using bNodes in the cretaed 
>>graph (and they are unlinked from the original bNodews in the data graph).
>>
>>If an app wants to find a bNode again, it needs to retrive enough defining 
>>properties.
> 
> 
> yeah.
> 
> Does this have a more general non-syntax related issue that should be
> pointed out - bnodes in results (any format - bindings, constructed
> graphs) may/will/should have labels related to the bnode labels the
> data graphs.

I think the bnode labels in results (XML or graph) should be *un*related to the 
data graph.  There is no promise of round tripping.  bNode labesl in results 
just enable one bNode to be marked as the same or different within the document. 
  No wider scope - just like RDF/XML and other syntaxes.

The current text is:
http://www.w3.org/2001/sw/DataAccess/rq23/#BlankNodes

"""
Blank Nodes and Results

In the results of queries, the presence of bNodes can be indicated but the 
internal system identification is not preserved. Thus, a client can tell that 
two solutions to a query differ in bNodes needed to perform the graph match but 
this information is only scoped to the results (result set or RDF graph).
"""

	Andy

> 
> Dave

Received on Friday, 26 November 2004 16:08:28 UTC