Re: [TTL] Differences between SPARQL and Turtle.

On May 2, 2011, at 12:13 , Andy Seaborne wrote:

> Hi Ivan,
> 
> >> # 4 RDF Collections as triple patterns
> >> No action.
> >> Not in Turtle, leave in SPARQL.
> >
> > Not that it is terribly important, but any reason why not allowing it
> > in Turtle, too? Or any major reason to leave it in SPARQL (apart from
> > backward compatibility...). I looks to me as being equally useless in
> > both languages...:-)
> 
> There is no technical reason why it can't be added .  Because you have to avoid
> 
> () .
> 
> which is no triples, it warps the grammar a bit.
> 
> There is no (major) reason to leave it in SPARQL that I know of.  I have only seen it in test cases (that I wrote :-)).  It is legal N3 (but so is "() . ")

My proposal is to harmonize these two. If it does not seem to create any issues with SPARQL, then let us remove it from both; if it does, let us add it to Turtle (and forget about it:-).


> 
>>> # 8 Escape Processing Proposal: Adopt Turtle style / Change
>>> SPARQL.
>>> 
>>> \u escapes can only appear in strings and IRIs \u do not appear in
>>> the grammar but are described separately as at present.
>>> 
>>> This is a change to SPARQL but in an area rarely seen.
>> 
>> Do you mean that adopt Turtle with that additional extension?
> 
> I was just proposing in strings and IRIs as per the current Turtle working draft.
> 
>> If my
>> understanding is correct, that would make a:\u03B1 also valid and
>> standing for a:α, right?
> 
> Not as I have proposed.  There has been some push back on that.
> 
>> I think that, for internationalization purposes, it is important that
>> this should be valid in Turtle; one does not always have the
>> possibility to type a:α in one's file...
> 
> That was my argument for making \u processing apply before parsing. Then it also applies to comments as well.
> 
> I don't agree with Richards comments here because if it's done before parsing, so newlines etc are still in the parser input whether they are written as newlines or as \u000A.  It's all unicode codepoint 10 to the parser.
> 
> 
> I think we only have \u because it's needed for N-triples which is US-ASCII.  If it weren't for that, I don't see why we need \u-escapes at all.

That sounds convincing... so if we allow N-triples to be UTF-8, then this would weaken the need for \uXXX, too...

> 
> Computers have other ways of inputting characters not on the keyboard like virtual keyboards or charmap programs.
> 
> The N-triples doc [*] does actually say that \u can only be used for certain characters (see table).  However, that's fairly impractical to enforce.
> 
> So removing \u-escapes would be an option except for backwards compatibility for N-triples.
> 

If we go for a unicodization of N-triples, then removing \u altogether both from SPARQL and Turtle seems to be a good approach, too. 

Would it create lots of problems in SPARQL? Any experience in how widely they are used?

Ivan


> 
> [*] http://www.w3.org/TR/rdf-testcases/#ntrip_strings
> 
>> If all this is true, then let us go ahead with the proposal...
>> 
>> Ivan
> 
>  Andy
> 


----
Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Monday, 2 May 2011 11:09:46 UTC