W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2009

Re: Alternative Syntaxes for BGPs

From: Birte Glimm <birte.glimm@comlab.ox.ac.uk>
Date: Thu, 29 Oct 2009 23:36:00 +0000
Message-ID: <492f2b0b0910291636u34c2621bg556a598e3911ff92@mail.gmail.com>
To: "Seaborne, Andy" <andy.seaborne@hp.com>
Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
[snip]
>> I would like to suggest alternative syntaxes for BGPs
>
> We already have a time-permitting feature on query language syntax.
Hm, but that is to change existing SPARQL syntax whereas this is about
using a completely different syntax in BGPs but one for which there is
a straight mapping into the SPARQL syntax.

[snip]
>> Now there are at least two possibilities. One could allow SPARQL
>> queries with BGPs in non-triple syntax (no mandatory support from
>> SPARQL systems)
>
> This raises some questions:
>
> 1/ Can the syntaxes be mixed in the same query? The same BGP?
Most likely not. In OWL you can use functional-style or Manchester or
turtle syntax, but you cannot mix. Parsing would be horrible then.

> 2/ If they are different syntaxes, how does a processor know which syntax a request is using?
That's a typical OLW problem. The OWL API tries different parsers
until it finds one that can parse. That is not ideal and pushing
different syntax support into tools as suggested below would work
better.

> 3/ Does it apply to RDFS? RIF? The keyword vocabulary is OWL-specific.
Functional-style syntax is OWL specific and there is even more than
one OWL syntax (Manchester, Turtle, OWL/XML, RDF/XML), but all of them
can directly be translated into triples. For RIF that is not the case,
which makes it harder to see how a RIF syntax would work in SPARQL
queries. RDFS works quite nicely with triples I think.

> 4/ Does this apply to SPARQL/Update as well as it shares pattern matching with SPARQL/Query?
It is just an alternative way for writing the BGP and could also work
for update. You can translate triples that are well-formed for OWL
into any other OWL syntax and you can translate other OWL syntaxes
into triples.

>> and another one is that SPARQL BGPs are always
>> triples, but query interfaces could support different BGP syntaxes and
>> translate them to triples before issuing the query.
>
> Viewing this as one possible DSL on top of SPARQL, and so should be handled by the tools is, I think, the best place for it and it can be developed outside the WG by various communities.  There might well be different syntaxes for different tools clusters (e.g. rules).

What's DSL?
It might be a W3C note, but I am not sure what the requirements on
this are. As also Kendall says, triple syntax for OWL constructs can
be awkward and at least OWL users and tool developers will probably
want more OWL support (either as a layer around SPARQL or directly
within SPARQL).

> It also means that tools can allow alternative syntaxes and still work against a SPQRQL endpoint that does not offer the syntax.

Yes. It means SPARQL endpoints don't have to worry about which parser
they have to try and endpoints don't have to also describe which
syntax they support, which has its charme.

> It removes it from the need to work on the SPARQL grammar used in the specifications which is already shared amongst different documents.  It removes the need to provide mechanisms for declaring what syntax a request is in at the protocol level if there isn't a single combined grammar.

I would not change the SPARQL grammar, but rather provide a mapping
from the alternative syntax into the standard SPARQL sytax.

Birte

> We are already time poor.
>
>> In any case, how does the group feel about adding a section about
>> alternative syntaxes to the entailment regimes document?
>
> I believe that the entailment regimes document should be focused on entailment and that alternative syntaxes is orthogonal to that.
>
>        Andy
>
>>
>> Cheers,
>> Birte
>>
>> --
>> Dr. Birte Glimm, Room 306
>> Computing Laboratory
>> Parks Road
>> Oxford
>> OX1 3QD
>> United Kingdom
>> +44 (0)1865 283529
>
>



-- 
Dr. Birte Glimm, Room 306
Computing Laboratory
Parks Road
Oxford
OX1 3QD
United Kingdom
+44 (0)1865 283529
Received on Thursday, 29 October 2009 23:36:33 GMT

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