Re: RDF-ISSUE-74: Prefixed names and slashes [RDF Turtle]

On 15/08/11 05:36, Gavin Carothers wrote:
> On Sat, Aug 13, 2011 at 12:08 PM, Richard Cyganiak<richard@cyganiak.de>  wrote:
>> Gavin,
>>
>> On 12 Aug 2011, at 19:14, RDF Working Group Issue Tracker wrote:
>>> New Turtle:
>>>
>>> Allowed:
>>> @prefix bob: http://example.org/bob/ .
>>> bob:goldfish\u002F1
>>
>> Is that allowed? Section 4.3 [1] says that all the backslash escapes are only allowed inside strings and IRI_REF. I don't see anything that allows them inside prefixed names.
>
> Then section 4.3 doesn't agree with the grammar:
>
> http://www.w3.org/TR/turtle/#term-turtle2-PN_CHARS_BASE
>
> One of them gets to give.
>
>>
>>> I'm not sure what the rational for continuing to disallow /'s in the local part of prefixed name is. RDFa via the CURIE spec via the IRI fragement production allows them.
>>
>> Turtle follows SPARQL. SPARQL has property paths: foaf:knows/foaf:name. So the slash character is taken.
>
> Except in the case of escaping. Which was one of the divergence points.

and the argument for the additional escaping is to put more characters 
into prefix names without expanding the syntax character set.  So now we 
have two approaches on the same issue: escaping and expanding the valid 
lexical token character set.

> IRIs,URIs,UR**s are a good bit older then property paths, so the slash
> character was taken already. ;)

It's not IRIs etc - it's prefixed names.  Prefix names are from SPARQL 
and Turtle.  "/" has never been legal in either.

The origin is qnames; qnames are quite restrictive; XML heritage has 
meant a conservative view of the space of characters in prefix names.
SPARQL decisions (not Turtle) included allowing leading digits in the 
local part and also "." inside the prefix name but not at the end.

If new language features are added to Turtle, then new data with old 
parsers can break.  Each little step may be not much in itself, but the 
accumulation seems to be heading to the point where it's going to be 
very noticeable.  e.g. We've already modified number behaviour ("18.").

> It's okay(ish) that SPARQL has decided
> to use / for property paths but will require some clear text on the
> subject in Turtle, as I the happy editor of Turtle went ahead and
> wrote a fair bit of turtle by hand without noticing that /'s were
> going to cause problems.

The alternative proposed was to use "!" as the property path sequential 
operator.  It didn't find favor.

> Specific example:
>
> @prefix turtleDocLoc:<http://www.w3.org/TR/2011/WD-turtle-20110809/>
>
> turtleDocLoc:examples/example1.ttl
>
> It's very surprisingnot to be able to write that. You can get around
> it by using @base a lot more, or by defining a LOT of prefixes. :\
> Neither solution is very readable.


"very surprising" -- can you provide the background for this please?

----

By the way, PN_LOCAL is also used in blank node labels.

 Andy

>
>>
>> Best,
>> Richard
>>
>> [1] http://www.w3.org/TR/turtle/#sec-strings

 Andy

Received on Monday, 15 August 2011 10:45:58 UTC