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

Character escapes in prefix names

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Fri, 25 Nov 2011 10:55:46 +0000
Message-ID: <4ECF7432.20104@epimorphics.com>
To: RDF-WG <public-rdf-wg@w3.org>
1/ If we want to have extra characters in prefixed names
(extra characters means ones not allowed by the current syntax for 
then it seems better to use the character escape mechanism.

Character escapes turn off the meaning of character in that context 
(e.g. turning " into a char in the string, not the delimiter).  The 
current meaning of these characters is to end the prefixed name.

Using character escapes is also (vaguely) readable.


A possible set is:


 From RFC 3986

A/ unreserved extras which have positional restrictions (leading "-" and 
trailing ".")  ~.-

B/ sub-delims   !$&'()*+,;=

C/ gen-delims without []   :/?#@

D/ %

The prefixed name is still required to be a valid IRI.

(I haven't gone though all these chars in detail but they are legal IRI 
chars and not ones marked "unwise", I think)

2/ Variant: Adding %XX as a token rule (so the parser will check it's 
two hex digits), otherwise have \% in the character escapes as above.

3/ Variant: One that we haven't discussed much is #, which is sometimes 
mentioned as a nuisance.  Unescaped # is also possible without major 
risk of breaking things.  You'd have to write a comment, with no 
immediately proceeding whitespace in the middle of a "triples" block.  I 
don't recall ever seeing such a thing.

Received on Friday, 25 November 2011 10:56:26 UTC

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