0

I am working on RDF query language. So, I have installed Apache Jena.
RDF data is given below:

@prefix foaf: <http://xlmns.com/foaf/0.1/> .

_:a foaf:name  "Alice" .
_:b foaf:name  "Ashish" .

And ARQ query is:

PREFIX foaf:  <http://xmlns.com/foaf/0.1/>

SELECT ?x ?name
WHERE { ?x foaf:name ?name }

Problem — my result is:

+---+------+
| x | name |
+---+------+
+---+------+

The correct result is:

+-----+---------+
|  x  |  name   |
+-----+---------+
| _:c | "Alice" |
| _:d | "Bob"   |
+-----+---------+
4

1 回答 1

3

您数据中的前缀错误。查询正确使用xmlns,但数据有错字xlmns(交换了“l”和“m”)。

于 2016-02-26T16:04:49.397 回答