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

Re: Make clear that SPARQL prefixed names are not CURIEs

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Thu, 08 Dec 2011 09:31:55 +0000
Message-ID: <4EE0840B.1040009@epimorphics.com>
To: public-rdf-wg@w3.org
CC: Richard Cyganiak <richard.cyganiak@deri.org>

On 21/08/11 15:51, Richard Cyganiak wrote:
> A comment on the Last Call draft of SPARQL 1.1 Query
> http://www.w3.org/TR/2011/WD-sparql11-query-20110512/
> If Section “Prefixed Names” is read without prior knowledge of Turtle or XML, then a reasonable reader would have no idea that only a restricted set of characters is allowed in local names. The section can easily be read as allowing *any* IRI to be abbreviated using PREFIX.
> It is documented that the editors of both HTML5 and Turtle made that mistake.
> The potential for confusion is further increased by the fact that CURIEs in RDFa are virtually identical to prefixed names, except that they allow *all* characters.
> Therefore I think it is important to draw attention to the syntactic restriction of local names in (or perhaps somewhere near the example at the end of 4.1.1).
> Something along these lines:
> “Note: Most punctuation characters are disallowed in the local part of prefixed names. Therefore, @prefix and prefixed names are most useful for abbreviating class and property IRIs, which by design usually avoid such punctuation. Other IRIs, such as web links, can often only be written using the angle bracket syntax, either as absolute IRIs, or relative to the base IRI.”
> Thanks,
> Richard


Thanks for the comment.  The delay in responding has been due to the 
work to aligne Turtle and SPARQL across two working groups.

The local part of prefixed names for both Turtle and SPARQL have 
recently changed to include, by character escapes, a wider range of 
characters. For example, og:video\:title for a local part "video:title". 
The two working groups have worked to have the same character escapes 
for both languages.

A wider range of IRIs can be abbreviated without resorting either to 
using the base URI and IRI resolution, or needing several prefixes.

The text in 4.1.1 has been updated to reflect this current design.

    Note that SPARQL local names allow leading digits while XML local
    names do not.  SPARQL local names also allow the non-alphanumeric
    characters allowed in IRIs via character escapes (e.g. ns:id\=123).
    SPARQL local names have more syntactic restrictions than CURIEs.

We would be grateful if you would acknowledge that your comments have 
been answered by sending a reply to this mailing list.

	on behalf of the SPARQL WG
Received on Thursday, 8 December 2011 09:32:36 UTC

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