W3C home > Mailing lists > Public > public-rdf-wg@w3.org > March 2013

Re: normalize bnode labels in Turtle tests?

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Tue, 26 Mar 2013 17:18:37 +0000
Message-ID: <5151D86D.90301@epimorphics.com>
To: public-rdf-wg@w3.org


On 26/03/13 14:03, Eric Prud'hommeaux wrote:
> David Robillard submitted a message with 5 comments, including patches
> to change all reference graph bnode labels to some repeatable pattern,
> e.g.
>
>    --- a/rdf-turtle/coverage/tests/nested_collection.nt	Sat Feb 23 14:12:41 2013 -0800
>    +++ b/rdf-turtle/coverage/tests/nested_collection.nt	Mon Feb 25 00:45:06 2013 -0500
>    @@ -1,5 +1,5 @@
>    -<http://a.example/s> <http://a.example/p> _:outerEl1 .
>    -_:outerEl1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:innerEl1 .
>    -_:innerEl1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
>    -_:innerEl1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
>    -_:outerEl1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
>    +<http://a.example/s> <http://a.example/p> _:b1 .
>    +_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:b2 .
>    +_:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
>    +_:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
>    +_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
>
> <http://www.w3.org/2011/rdf-wg/wiki/Turtle_Candidate_Recommendation_Comments#c13>
>
> pros:
>    folks with a particular parser can do lexical comparison.
>
> cons:
>    lose some labels meant to assist developers.
>    reduces pressure for implementations to propery manage bnodes.
>
> In net, do we want to normalize bnode labels in the Turtle tests?

Not keen, mainly because this seems to be tweaking with no obvious 
boundary as to what to change next and what not to.

It is a simple matter to build into the test frame, preprocessing the NT 
files, relabeling the bNodes if needed.  Keep it inside the testing and 
outside the test suite.

A system (not just parser) has manage bNode labels somewhere because 
reading the same file twice generates different bNodes.  In the overall 
products of the WG, we ought to stick to that line.

Even triple order from parsing is dubious - generate the rdf:first 
before or after rdf:rest?  The parsing algorithm defines the output 
triples, not the prescriptive order.

	Andy

>
Received on Tuesday, 26 March 2013 17:19:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:04:26 UTC