W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2012

Re: BNode label comparisons for JSON/CSV/TSV result tests

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Tue, 23 Oct 2012 19:44:15 +0100
Message-ID: <5086E57F.9000506@epimorphics.com>
To: public-rdf-dawg@w3.org


On 22/10/12 23:53, Chime Ogbuji wrote:
> I'm working on providing JSON/CSV/TSV result tests for Akamu and the
> main distinction in most of the tests I'm failing has to do with
> Blank Node labels.  This might have been discussed before, but should
> comparisons between results produced by the implementations and the
> expected results disregard comparison of BNode labels?  In
> particular, the test document says (in the section regarding the CSV
> result format):
>
> "Care should be taken to ensure that results produced in the CSV
> format are compared properly to the expected result values. In all
> other respects"
>
> I prefer to not change the implementation of the underlying RDF
> processor to retain the BNode labels as they appear in the document
> in order to pass these tests, since they really are only scoped to
> the containing Turtle document.
>
> Any clarification (or pointers to prior conversation on this topic)
> would be helpful.
>

BNode labels are scoped to the document.  Every time you read a 
document, new bnodes, with new internal ids, get generated loosing the 
label in the document (think of reading the same turtle twice).  Ditto 
result sets - the label is not preserved.

Two result sets are equivalent if they are isomorphic to within bnode 
labelling (and row order).


?a =_:a , ?b=1
?a =_:a , ?b=2

is isomorphic to

?a =_:b , ?b=2
?a =_:b , ?b=1

but not

?a =_:z , ?b=1
?a =_:x , ?b=2

	Andy
Received on Tuesday, 23 October 2012 18:44:56 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:49 GMT