W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2005

Re: [Fwd: SPARQL: Backslashes in string literals]

From: Dave Beckett <dave.beckett@bristol.ac.uk>
Date: Thu, 04 Aug 2005 14:18:12 +0100
To: andy.seaborne@hp.com
Cc: RDF Data Access Working Group <public-rdf-dawg@w3.org>
Message-Id: <1123161492.20354.6.camel@hoth.ilrt.bris.ac.uk>

On Thu, 2005-08-04 at 13:52 +0100, Seaborne, Andy wrote:
> ACTION AndyS: take the "Backslashes in string literals" comment
> 
> I have added text for string escapes in
> http://www.w3.org/2001/sw/DataAccess/rq23/#grammar
> The escapes are:
> \t \b \n \r \f \' \" \uXXXX \UXXXXXXXX
> The choice of escapes was based on what programming languages seem to typically 
> accept.
> 
> (which has the strange effect that writing the string in your fav language means 
> the processing is done there, not in SPARQL, if you use one backslash which 
> works for everything except \n and \r because the are not allows as raw 
> charcater in single line strings).
> 
> At Dave's suggestion,  I also put in text to allow \u and \U in IRIs and qnames 
> in support of writing queries where the input system isn't capable of the full 
> range of UTF characters
> 
> When reviewed and approved, I'll reply on the comments list.

Have had a read through:

It doesn't say if \anything-else has a meaning or is banned.  I'd prefer
the latter (not in the syntax) in case it needs something added later.

Oops:
  [[where HEX  is a hexadecimal character
     HEX ::= [0-9] | [A-Z] | [a-z]
  ]]

Turtle follows N-Triples and picks just uppercase for hex \u & \U
escapes (I think there was something in the older charmod drafts about
having just one way to encode it).  I'd prefer to follow that [0-9]
[A-F].

Apart from that, looks ok.  I'll likely match it in Turtle.

Dave
Received on Thursday, 4 August 2005 13:18:19 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:24 GMT