2015-05-05 63 views
0

是否可以在远程开发者的Where子句中执行sparql构造?Sparql在服务上构建

CONSTRUCT { ?idbcountry skos:definition ?def . } 

WHERE { 

      ?idbcountry a skos:Concept . 
      ?idbcountry rdfs:label ?label . 
      FILTER(lang(?label) = "en") 

    Service <http://dbpedia.org/sparql> { 
       ?s a <http://dbpedia.org/ontology/Country> . 
       ?s rdfs:label ?label . 
       ?s rdfs:comment ?def 
       FILTER(lang(?label) = "en") 
       FILTER(lang(?def) = "en") 
    } 
} 
+0

是的。当你尝试这个时,你遇到了一些问题吗?如果是这样,什么? –

+1

另外,不要做'lang(...)=“en”'。使用'langMatches(lang(...),“en”)'。 –

+0

由于选择版本的查询工作,我可以想象结果是好的,我结束了简单地使用插入版本的查询,它的工作。 – MaatDeamon

回答

0

我发现这个问题,这是由于TopBraid编辑器。这是间距问题。该地点和构造不应该有超过两条线将它们分开......除此之外没有其他的间距角落案例。在TopBraid Sparql编辑器中,更一般的间距是很重要的。

因此查询没问题。