Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The query doesn't work if you write URLs in the query (only works with prefixes) #9

Closed
dayures opened this issue Oct 6, 2016 · 2 comments

Comments

@dayures
Copy link
Contributor

dayures commented Oct 6, 2016

If you use a query as the next one, the plugin doesn't work

SELECT DISTINCT ?llr ?llrLabel ?country ?countryLabel
FROM <http://library.landportal.info>
WHERE {
   ?llr a  <http://purl.org/ontology/bibo/Document> ;
        <http://purl.org/dc/terms/spatial> ?country ;
        <http://purl.org/dc/terms/title> ?llrLabel .
   ?country <http://purl.org/dc/terms/identifier> ?iso3 ;
            <http://www.w3.org/2000/01/rdf-schema#label> ?countryLabel
   FILTER ( ?iso3 = "BRA")
}
ORDER BY ?llr

Log message:
Bad response, 400: Virtuoso 37000 Error SP030: SPARQL compiler, line 5: syntax error at 'WHERE'
SPARQL query:
define sql:big-data-const 0 define sql:gs-app-callback "ODS" PREFIX foaf: http://xmlns.com/foaf/0.1/
PREFIX bibo: http://purl.org/ontology/bibo/
PREFIX dc: http://purl.org/dc/terms/
PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema#
SELECT DISTINCT ?llr ?llrLabel ?country ?countryLabel FROM WHERE { ?llr a ; ?country ; ?llrLabel . ?country ?iso3 ; ?countryLabel FILTER ( ?iso3 = "BRA") } ORDER BY ?llr

@acorbi acorbi closed this as completed in e658e5b Mar 13, 2017
acorbi pushed a commit that referenced this issue Mar 13, 2017
updated old value wpckan & fixed bug #9
@acorbi
Copy link
Contributor

acorbi commented Mar 13, 2017

@dayures thanks for your PR, which I have merged. Thanks for spotting that inconsistency with the gettext domain (wpsparql vs wpckan) and adding that missing '/' char. Also, having a textarea is way better than the normal 1-liner input.

However, I am still not sure about the issue with the namespaces/prefixes. the current implementation expects you to add the namespaces you are going to use on the settings under supported namespaces

screenshot from 2017-03-13 17-22-42

I understand that you want to be able to specify the terms used on the query using directly URLs and not the prefixes added to the settings, correct?

Can you paste here a query that should work after merging this PR? I have tried a couple without success... We can also have a quick call/chat tomorrow if you want.

@dayures
Copy link
Contributor Author

dayures commented Mar 13, 2017

@acorbi I have updated the markup of my first comment, showing a SPARQL query with full URL.
The issue was fixed removing the use of strip_tags function when the SPARQL query is saved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants