CURIEs in Turtle

* Toby Inkster <tai@g5n.co.uk> [2010-02-03 15:44-0000]
> > It also might be worth starting to consider whether to align the terminals
> > (qnames) more with sparql first.
> 
> Or perhaps align both with CURIEs <http://www.w3.org/TR/curie/> ?

I suspect that syntactic differences between the surrounding languages
will make that difficult, but let's give it a look...

CURIEs allow lots of punctuation into qnames, punctuation that serves
as individual tokens in Turtle, and even more in SPARQL. I did model
curies in SPARQL to see how stuff would parse. Examining the part of
SPARQL which is also Turtle, we can sniff around Turtle+CURIEs:

For instance, ASK{?s?o:n1.?s2?p2:n2} includes two triples, but the
trailing dot in CURIEs allows it to produce one (the PNAME_LN terminal
matches "n1.?s2?p2:n2").
  http://www.w3.org/2005/01/yacker/uploads/SPARQL_CURIE_MoinDot?lang=perl&text=ASK{%3Fs%3Fo%3An1.%3Fs2%3Fp2%3An2}&action=validate+text
compare to
  http://www.w3.org/2005/01/yacker/uploads/SPARQL?lang=perl&text=ASK{%3Fs%3Fo%3An1.%3Fs2%3Fp2%3An2}&action=validate+text

We see similar behavoir for e.g. ',' etc: try ASK{?s?o:n1,:n2 .}

Of course, we can add WS to make it parse correclty:
  ASK{?s?o:n1 ,:n2 .}

Does the world want to add WS to get improved compact expressivity?
Let's hear from the world, here's the microphone.

Conveniently (as we probably want any liberalizations in Turtle to be
available to SPARQL, '{}'s and '<>'s aren't in curie local names. Note
that
  ASK{?s?o:n1{?s?o:n2}.}
produces two TriplesBlocks and
  ASK{:s<p><o>.}
produces a triple.

> -Toby

-- 
-ericP

Received on Wednesday, 3 February 2010 17:33:11 UTC