RubenVerborgh / SPARQL.js

A parser for the SPARQL query language in JavaScript
Other
344 stars 66 forks source link

Catch DELETE/INSERT DATA queries that include non-ground triples #31

Open mterdjimi opened 8 years ago

mterdjimi commented 8 years ago

Hello,

As from the SPARQL 1.1 specification, DELETE/INSERT DATA queries only allow ground triples. However, the following (incorrect) query does not return any parsing error :

DELETE DATA { ?s ?p ?o }

Best,

Mehdi

RubenVerborgh commented 8 years ago

Interesting, this is not specified in the grammar.

The SPARQL 1.1 Update specification indeed mentions that triples need to be ground. I also noted an exception on blank nodes.

mterdjimi commented 8 years ago

Indeed, both QuadPattern and QuadData refer to Quads in the grammar.

joachimvh commented 4 years ago

Noticed this issue since I'm going through UPDATE stuff myself.

This actually is specified in the grammar, it's note 8 in the notes above the grammar table. The exception on blank nodes is note 10 (which links to the section you linked).