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

Re: [TTL] Differences between SPARQL and Turtle.

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Mon, 02 May 2011 20:11:00 +0100
Message-ID: <4DBF01C4.6070804@epimorphics.com>
To: public-rdf-wg@w3.org
# 4 RDF Collections as triple patterns

3 choices:

A/ Remove from SPARQL.
B/ Add to Turtle
C/ Do nothing.  Discourage use

>>> That sounds convincing... so if we allow N-triples to be UTF-8,
>>> then this would weaken the need for \uXXX, too...
>>
>> Yes .. but ... We would invalidate N-triples files already out
>> there which I think would be very bad IMHO.
>
> Ouch. Sigh...
>
> Whatever we decide, we should probably put in a warning into Turtle
> and SPARQL saying: "don't use that stuff!":-) Seriously, I must admit
> I do not have a strong opinion which way to go, because I do not
> believe people should really use this; ie, we should take the
> approach that is the easiest to implement both in Turtle and SPARQL.
> But I believe the two should be the same.

Proposal:

Strict \u-escape in strings (STRING_LITERAL1,2 STRING_LITERAL_LONG1,2) 
and IRI_REF) and deprecate their use in the "4.3. String Escapes" by

"""
\u and \U escapes should be avoided in UTF-8 charset formats. They are 
retained in the grammar for compatibility with N-triples formats 
currently deployed with charset US-ASCII.
"""

	Andy

Complete, revised proposal:

http://www.w3.org/2011/rdf-wg/wiki/Diff_SPARQL_Turtle

describes the differences and has examples.

Turtle WD refers to:
http://www.w3.org/2010/01/Turtle/

     Andy

Proposals for resolution of Turtle/SPARQL compatibility:

# 2 Decimals
Already done.
SPARQL has changed.

# 3 bNode property lists as triple patterns
Proposal: Add to Turtle

# 4 RDF Collections as triple patterns

3 choices:

A/ Remove from SPARQL.
B/ Add to Turtle
C/ Leave as is.  Discourage use

# 5 Trailing dots
Proposal: No changes for the moment.

Include in TriG

Maybe add to Turtle in a later draft; it will not invalidate a valid 
Turtle document.

# 6 Strings
Turtle WD has the changes to adopt SPARQL ' and '''-strings

# 7 Local part of prefix names can begin with a number
Turtle WD has the changes to include numbers at the start of the local part.

# 8 Escape Processing
Proposal: Adopt Turtle style / Change SPARQL.



\u escapes can only appear in strings and IRIs

Strict \u-escape in strings (STRING_LITERAL1,2 STRING_LITERAL_LONG1,2) 
and IRI_REF)

\u do not appear in the grammar but are described separately as at 
present.  Their use is discouraged:

"4.3. String Escapes"

"""
\u and \U escapes should be avoided in UTF-8 charset formats. They are 
retained in the grammar for compatibility with N-triples formats 
currently deployed with charset US-ASCII.
"""



-------
The SPARQL Grammar (editors' working draft) currently has 3 items marked 
as a document note which will be in the LC candidate:

http://www.w3.org/2009/sparql/docs/query-1.1/rq25.xml#grammar
Received on Monday, 2 May 2011 19:11:34 GMT

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