Turtle syn-prefix-06.ttl problem

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
gregg@greggkellogg.net

[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