Skip to content

Instantly share code, notes, and snippets.

@samuell
Created August 17, 2017 17:17
Show Gist options
  • Save samuell/e70f4d598defc847d543a4ff9307e265 to your computer and use it in GitHub Desktop.
Save samuell/e70f4d598defc847d543a4ff9307e265 to your computer and use it in GitHub Desktop.
?- use_module(library(semweb/sparql_client)).
true.
?- sparql_query('CONSTRUCT { ?s ?p ?o } WHERE { ?s ?p ?o } LIMIT 1',
Row,
[ host('localhost'),
path('/w/index.php/Special:SPARQLEndpoint'),
port(8080) ]).
ERROR: Domain error: `sparql_result_document' expected, found `'application/xml'' (<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="http://localhost:8080/w/index.php?title=Special:URIResolver/Property-3AFoaf-3Aname">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
</rdf:Description>
</rdf:RDF>)
@samuell
Copy link
Author

samuell commented Aug 17, 2017

Fixed now ... by setting Content-type: applixation/rdf+xml, not application/xml, in RDFIO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment