comunica / jQuery-Widget.js

🖼 A jQuery widget to query heterogeneous interfaces using Comunica SPARQL
http://query.linkeddatafragments.org/
MIT License
18 stars 35 forks source link

query interface adds prefix declarations before executing query #149

Open balhoff opened 1 year ago

balhoff commented 1 year ago

Issue type:


Description:

The query interface at https://query.linkeddatafragments.org seems to add prefix declarations before executing a query, even if these conflict with prefix declarations that are typed into the input. If I configure a datasource https://query.wikidata.org/sparql and enter this query:

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?s ?o
WHERE {
  ?s rdf:type ?o .
}
LIMIT 10

I get an error from the SPARQL endpoint: java.util.concurrent.ExecutionException: org.openrdf.query.MalformedQueryException: Multiple prefix declarations for prefix 'owl'

I don't see a way in the UI to configure which prefix declarations are added, or not.


Bounty

A bounty has been placed on this issue by:

Comunica Association
€136

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

github-actions[bot] commented 1 year ago

Thanks for reporting!

jeswr commented 1 year ago

Was able to reproduce against wikidata; here is the link https://query.linkeddatafragments.org/#datasources=https%3A%2F%2Fquery.wikidata.org%2Fsparql&query=PREFIX%20owl%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%3E%0APREFIX%20rdf%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0ASELECT%20%3Fs%20%3Fo%0AWHERE%20%7B%0A%20%20%3Fs%20rdf%3Atype%20%3Fo%20.%0A%7D%0ALIMIT%2010.

You are correct that there is not a way in the UI to configure the prefixes.

rubensworks commented 5 months ago

A bounty has been placed on this issue via the Comunica Association (see original post).