W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2011

Re: Parsing "18." in SPARQL

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Sun, 17 Apr 2011 16:58:07 +0100
Message-ID: <4DAB0E0F.7070208@epimorphics.com>
To: Lee Feigenbaum <lee@thefigtrees.net>
CC: Birte Glimm <birte.glimm@comlab.ox.ac.uk>, Steve Harris <steve.harris@garlik.com>, SPARQL Working Group <public-rdf-dawg@w3.org>
If we'd have noticed in SPARQL 1.0, then my preference for the (blank 
sheet of paper) design would be 18.0.  i.e. required non-empty decimal part.

This has come up a couple of times on the jena users mailing list - 2 or 
3 times from memory.  So it has tripped people up but it's not very common.

The origin of issue if that SWI-prolog gets it wrong but the author has 
also said, effectively, file a SWI-prolog bug report.  From that, the 
RDF-WG has a style preference.  It's not a bug ... in SPARQL :-)

>>>> Our options:
>>>>
>>>> 1) Agree that this was an error in SPARQL 1.0. Make the same change
>>>> to the grammar for SPARQL 1.1. This makes some previously legal
>>>> queries invalid. It also changes the meaning of some queries that
>>>> were valid before and would still be valid now.
>>>>
>>>> 2) Decline to make a change. SPARQL triple pattern syntax and Turtle
>>>> syntax will continue to diverge in this particular instance.
>>>>
>>>> 3) Ask the RDF WG to reconsider the decision.
>>>>
>>>> Thoughts?
>>>
>>> My feeling is that we should regard it as a bug, and do 1). It's
>>> potentially out of whack with our charter, but it seems like the most
>>> helpful thing for the community.
>>>
>>> - Steve


(1) is probably the best thing to do. I suggest we put a working group 
note in the LC draft (a very visible red box) stating that it's a
change the WG is going to make unless community comments are received.

(2) is not good.


My main concern is that RDF-WG will make other style-driven changes to 
Turtle (e.g. dots and prefix names).

This form:

[ :p 1 ; :p 2 ]

is valid SPARQL but not Turtle (and is legal in N3) - in Turtle only 
explicit subject forms are legal.  So it's legal INSERT DATA {}

:s :p [ :p 1 ; :p 2 ] .

I suggest writing to RDF-WG explaining the timing and asking them to 
follow SPARQL (1.0) here and where ever possible.

The other odd case is a free-standing list:

(1 2 3 4) .

which is legal SPARQL.  It's quite rare in data although there was a 
question about it recently on the Jena users list (and an output bug in 
Jena - pretty printing Turtle is not trivial).

While hardly critical, the value of Turtle and SPARQL alignment is 
significant.  It's not about style and personal design preferences - 
it's about maximising uniformity.  If someone does not like a particular 
syntax form, then just don't use it.

	Andy
Received on Sunday, 17 April 2011 15:58:42 GMT

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