W3C home > Mailing lists > Public > public-rdf-wg@w3.org > April 2011

Re: [TTL] Standardizing N-Triples

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Sat, 02 Apr 2011 19:54:53 +0100
Message-ID: <4D9770FD.6070307@epimorphics.com>
To: Alex Hall <alexhall@revelytix.com>
CC: Steve Harris <steve.harris@garlik.com>, nathan@webr3.org, Eric Prud'hommeaux <eric@w3.org>, Richard Cyganiak <richard@cyganiak.de>, RDF-WG <public-rdf-wg@w3.org>
> The headache (for me at least) isn't resolving the relative IRIs, it's
> picking a base IRI to resolve against when one isn't readily available.
> I remember being surprised when parsing some Turtle with Jena to find
> that it was emitting IRIs relative to the base directory from which I
> was running the program.  That isn't to pick on Jena

No problem - this is a bit messy as there isn't "right" answer that is 
also user expectation. "file:" URLs do not help.  If you think anything 
is wrong and needs fixing, then let us know.

> -- if you don't
> have a base IRI then the user home directory makes as much sense as any
> other IRI you could arbitrarily choose.  The point is that you have to
> make that choice, and not all systems do so consistently.

The base is (should be!) the file you are parsing, <file:///dir/file>. 
If you write <x> then you will get <file:///dir/x>.
If you write <#x> then you will get <file:///dir/file#x>.

<x> <#y> <../z> .

<file:///home/afs/tmp/x> <file:///home/afs/tmp/X.ttl#y> 
<file:///home/afs/z> .

The official rules are in RFC 3986:

and we're applying 5.1.3 "URI used to retrieve the entity"

5.1.1. is @base.

Received on Saturday, 2 April 2011 18:55:38 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 22:01:58 UTC