W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > February 2012

SPARQL 1.1 Update Delete Insert order

From: Peter Ansell <ansell.peter@gmail.com>
Date: Thu, 9 Feb 2012 09:51:03 +1000
Message-ID: <CAGYFOCTFMovddwf+TcSC25ZDup8p2xo51U77nuRBtK4Ji7toBA@mail.gmail.com>
To: public-rdf-dawg-comments@w3.org

In the SPARQL 1.1 Update draft dated 5 January 2012 [1], in Section
3.1.3 "DELETE/INSERT", the grammar seems to specify that a Delete
always precedes an Insert if both are in a single query.

    ( ( DeleteClause InsertClause? ) | InsertClause )

However, there are examples in that section where Insert comes before
Delete. I tried running the example queries from Section 3.1.3 using
Sesame-2.6.3 and it failed with a parsing error when it reached the
DELETE keyword, which is what I would expect if the grammar is correct
and Sesame is following it strictly.

I would like it if the delete and insert clauses were interchangeable,
as long as there is no necessary semantics attached to the Delete
first order. For example, it might be changed to:

    ( ( DeleteClause InsertClause? ) | ( InsertClause DeleteClause? ) )

If that is not possible, the examples should be modified so that in
each example, the DeleteClause comes before the InsertClause.

The grammar rule, 42, in the SPARQL 1.1 Query draft [2] matches the
grammar in the SPARQL 1.1 Update Section 3.1.3, so both would need to
be modified if the ordering changes.

    [42] Modify ::= ( 'WITH' IRIref )? ( DeleteClause InsertClause? |
InsertClause ) UsingClause* 'WHERE' GroupGraphPattern


Peter Ansell

[1] http://www.w3.org/TR/2012/WD-sparql11-update-20120105/#deleteInsert
[2] http://www.w3.org/TR/2012/WD-sparql11-query-20120105/#sparqlGrammar
Received on Wednesday, 8 February 2012 23:51:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:52:12 UTC