W3C home > Mailing lists > Public > public-rdf-comments@w3.org > February 2012

Re: Turtle Test Suite document issues

From: Henry Story <henry.story@bblfish.net>
Date: Tue, 28 Feb 2012 10:26:02 +0100
Cc: "public-rdf-comments@w3.org" <public-rdf-comments@w3.org>
Message-Id: <6CA9242B-F718-4260-A623-1035AAC14A98@bblfish.net>
To: Gregg Kellogg <gregg@kellogg-assoc.com>

On 28 Feb 2012, at 02:24, Gregg Kellogg wrote:

> On Feb 27, 2012, at 2:49 PM, Henry Story wrote:
> 
>> I am now implementing a test suite using the document linked from the spec
>> 
>>  http://www.w3.org/TR/turtle/tests/
>> 
>> So first it says 
>> 
>> [[
>> The tests should be performed with an assumed base URI of http://www.w3.org/2001/sw/DataAccess/df1/tests/.
>> ]]
>> 
>> but 
>> 
>> http://www.w3.org/TR/turtle/tests/base1.ttl
>> 
>> does not have that base and neither does 
>> 
>> http://www.w3.org/TR/turtle/tests/base1.out
>> 
>> which is the answer to it. Now base is defined with the rules
>> 
>> 
>>  base	   ::=   	BASE IRI_REF
>>  <BASE>	   ::=   	"@base"
>> 
>> but that is not what we find in that file
> 
> When I invoke these tests, I tell my processor that the document origin is relative to <http://www.w3.org/2001/sw/DataAccess/df1/tests/>. @base is a mechanism to override
> the document source location, so in the absence of @base, <> should expand to the document
> origin. In the case of the Ruby parser, it will either use the actual URL from which the document
> is loaded as base, which can be overridden by passing a :base_uri option, which is what I
> do when running these tests.

Oh, you are saying they are purposefully at a different location so that one can test the @base.
Ok makes sense.

Still that leaves the problem that 
http://www.w3.org/TR/turtle/tests/base1.ttl

is broken, because "@base foaf:" is not a legal construct.

@base foaf: <http://www.w3.org/2010/01/Turtle/tests/> .

And yet this file does not start with bad-XXXX as it should 
as explained by the README if it were a broken file.


> 
> Gregg
> 
> 
>> -------------8<----------------------
>> $ curl -i http://www.w3.org/TR/turtle/tests/base1.ttl
>> HTTP/1.1 200 OK
>> Date: Mon, 27 Feb 2012 22:43:36 GMT
>> Server: Apache/2
>> Last-Modified: Mon, 08 Aug 2011 15:58:51 GMT
>> ETag: "144-4aa0085f524c0"
>> Accept-Ranges: bytes
>> Content-Length: 324
>> Cache-Control: max-age=21600
>> Expires: Tue, 28 Feb 2012 04:43:36 GMT
>> P3P: policyref="http://www.w3.org/2001/05/P3P/p3p.xml"
>> Access-Control-Allow-Origin: *
>> Connection: close
>> Content-Type: text/n3; qs=0.89
>> 
>> # base1 - Resolution of a relative URI against an absolute base.
>> # 
>> # $Id: base1.ttl,v 1.1 2011/08/08 15:58:52 eric Exp $
>> 
>> @base foaf: <http://www.w3.org/2010/01/Turtle/tests/> .
>> <prefix1.ttl> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#PositiveSyntaxTest> .
>> -------------8<----------------------
>> 
>> 
>> here @base foaf: is not parseable, and indeed neither Jena, nor Sesame 
>> parse it.
>> 
>> 
>> 	Henry
>> 
>> Social Web Architect
>> http://bblfish.net/
>> 
>> 
> 

Social Web Architect
http://bblfish.net/
Received on Tuesday, 28 February 2012 09:26:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:59:30 UTC