1

I'm trying to use the following SPARQL syntax with GraphDB. I've never used it anywhere else before, so I don't have a good sense of whether it's official.

See also Using the 'GRAPH' keyword in SPARQL to fetch remote graphs

LOAD <http://raw.githubusercontent.com/evidenceontology/evidenceontology/master/eco.owl> INTO GRAPH <http://example.com/loaded>

When I try to load an RDF/XML file with an .owl extension, I generally get an error message like

Internal Server Error (#500)

White spaces are required between publicId and systemId. [line 1, column 63]

When I try to load a turtle file with a .ttl extension, I generally get something more like

Internal Server Error (#500)

IRI included an unencoded space: '32' [line 1]

What am I doing wrong?

Mark Miller
  • 3,011
  • 1
  • 14
  • 34
  • 1
    This does work for me, when replacing your ontology URI with `https://protege.stanford.edu/ontologies/pizza/pizza.owl`, and doesn't work when replacing your ontology URI with `https://raw.githubusercontent.com/owlcs/pizza-ontology/master/pizza.owl`. – Stanislav Kralin Oct 09 '17 at 20:35
  • Indeed it's [official](https://www.w3.org/TR/2013/REC-sparql11-update-20130321/#load) – UninformedUser Oct 09 '17 at 21:08
  • Something is weird with the file encoding that Github returns. I downloaded the raw file to disk and then loaded it successfully via `LOAD INTO GRAPH ` – UninformedUser Oct 09 '17 at 21:09
  • On the other hand, when I tried your query with the Github URL, I got `There was a fatal failure during preparation of 8f341e54-9584-4d2d-a201-aa44bcede427 org.openrdf.rio.RDFParseException: IRI included an unencoded space: [line 1]` (I used Stardog) – UninformedUser Oct 09 '17 at 21:10
  • 1
    Solution: Use RawGit which "serves raw files directly from GitHub with proper Content-Type headers": https://cdn.rawgit.com/evidenceontology/evidenceontology/master/eco.owl You can find the service [here](https://rawgit.com/) – UninformedUser Oct 09 '17 at 21:14
  • @AKSW thanks for the RawGit suggestion. I do have the ontology that I'd like to `LOAD` on github, but it's currently a password protected repository. I also have it in the web root directory of an AWS server and I can view it in a web browser, but trying to load that results in the same error messages I quoted in my question. **TL;DR:** Since this clearly works under some circumstances, I guess I need to investigate what's happening to my encoding. – Mark Miller Oct 10 '17 at 11:50
  • Right, something is strange. One difference is the content type in the response header: `curl -I -L http://raw.githubusercontent.com/evidenceontology/evidenceontology/master/eco.owl` leads to `Content-Type: text/plain; charset=utf-8` On the other hand, `https://cdn.rawgit.com/evidenceontology/evidenceontology/master/eco.owl ` returns `Content-Type: application/rdf+xml;charset=utf-8 ` – UninformedUser Oct 10 '17 at 12:29

0 Answers0