I have a query which I run inside protege(owl version 3.4.2). I have an apostrophe in the middle.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wel: <http://www.semanticweb.org/dell/ontologies/2014/2/untitled-ontology-11#>
SELECT (strafter(str(?o), '#') AS ?gender)
WHERE { wel:Grandmother's_house ?classOf ?o . }
The query breaks from the apostrophe. I tried using \ in front of '. But it didn't work. I found this link. http://www.w3.org/TR/rdf-sparql-query/#QSynLiterals. After following that I did something like this, WHERE { wel:Grandmother< STRING_LITERAL1>s_house ?classOf ?o . } . Still no use. How can I escape the apostrophe in my query?
wel:Grandmother's_house
. I spent a while looking at earlier single quotes instrafter(str(?o), '#')
for a while, thinking to myself "that looks OK…" – Joshua Taylor