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

Turtle local-name escapes

From: Alex Hall <alexhall@revelytix.com>
Date: Thu, 2 Feb 2012 13:59:39 -0500
Message-ID: <CAFq2biw9hWa0DM_mud0fV2JP0acY6W_O1kDqB=Du2ZU7rqhmJg@mail.gmail.com>
To: RDF WG <public-rdf-wg@w3.org>
I have a couple of questions about character escapes in the local part of
Turtle prefixed names (
http://dvcs.w3.org/hg/rdf/raw-file/default/rdf-turtle/index.html#sec-grammar
):

[57]   <PN_LOCAL>   ::=   ( PN_CHARS_U | [0-9] | PLX ) (( (( PN_CHARS | "."
| PLX ))* ( PN_CHARS | PLX ) ))?
[58]   <PLX>   ::=   PERCENT | PN_LOCAL_ESC
[59]   <PERCENT>   ::=   "%" HEX HEX
[60]   <HEX>   ::=   [0-9] | [A-F] | [a-f]
[61]   <PN_LOCAL_ESC>   ::=   "\\" ( "_" | "~" | "." | "-" | "!" | "quot; |
"&" | "'" | "(" | ")" | "*" | "+" | "," | ";" | "=" | ":" | "/" | "?" | "#"
| "@" | "%" )

1. I'm a bit confused about the inclusion of %-encoded octets. It's not
intended that the pname expansion also decode these octets, is it?

e.g. given a prefix ':' for the namespace 'http://example.com/', the
prefixed name ':foo%2Fbar' expands to the IRI 'http://example.com/foo%29bar'
and not 'http://example.com/foo/bar', correct?

2. Is the use of "\\" at the start of a character escape sequence a
formatting bug in the document? Character escapes use a single backslash,
right?

On an unrelated note, section 5.1 starts off with the sentence "Parsing
Turtle requires a state of four items:" but the ensuing list has five items.

-Alex
Received on Thursday, 2 February 2012 19:00:27 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:25:47 GMT