小编use*_*940的帖子

如何在sparql查询中转义撇号

我在protege(猫头鹰版本3.4.2)中运行了一个查询。我中间有撇号。

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 . }
Run Code Online (Sandbox Code Playgroud)

查询从撇号中断。我尝试在'前面使用\。但这没有用。我找到了此链接。http://www.w3.org/TR/rdf-sparql-query/#QSynLiterals。在执行完类似的操作之后,WHERE {wel:Grandmother <STRING_LITERAL1> s_house?classOf?o。}。还是没用。如何在查询中转义撇号?

sparql

1
推荐指数
1
解决办法
859
查看次数

标签 统计

sparql ×1