W3C home > Mailing lists > Public > public-rdf-wg@w3.org > November 2012

Turtle syn-prefix-06.ttl problem

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Wed, 31 Oct 2012 21:35:21 -0400
To: Andy Seaborne <andy.seaborne@epimorphics.com>
CC: RDF WG <public-rdf-wg@w3.org>
Message-ID: <D0B1E72C-0D97-40A2-A68A-7562F9FFAD47@greggkellogg.net>
Andy, I think there's a problem with this particular test [1]

# colon is a legal pname character
@prefix : <http://example> .
@prefix x: <http://example> .
:a:b:c  x:d:e:f :::: .

Colon is indeed a legal pname character, but the resulting URI is not: <http://examplea:b:c>.

Of course, this my depend on your definition of a syntax test. For me, this means to parse the input without generating an error. As I attempt to construct an IRI, the library I use (Ruby Addressable::URI) flags this as an issue. In this particular case, I believe it is because the authority part of the URI contains an illegal port. From 3986 and authority is defined as follows:

   authority   = [ userinfo "@" ] host [ ":" port ]

So this means, that the authority is broken down as follows:

host - examplea
port - b:c

and port is defined as

     port        = *DIGIT

I think the test would be just as valid if prefix were set to <http://example/>:

# colon is a legal pname character
@prefix : <http://example/> .
@prefix x: <http://example/> .
:a:b:c  x:d:e:f :::: .

This would result in the following:

<http://example/a:b:c> <http://example/d:e:f> <http://example/:::> .

Gregg Kellogg

[1] http://svn.apache.org/repos/asf/jena/Experimental/riot-reader/testing/RIOT/Lang/Turtle/syn-prefix-06.ttl
Received on Thursday, 1 November 2012 01:36:03 UTC

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