rdfstore-js
rdfstore-js copied to clipboard
Support RDF lists correctly
The following query only has one value as result, but there should be three values (:Jim
, :Mark
and :Ian
):
rdfstore.create(function(err, store) {
store.load("text/n3", "@prefix :<#this/> . :Bob :brothers (:Jim :Mark :Ian) .", function(err, loadedTriples) {
store.execute("\
prefix :<#this/>\
prefix rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\
select * where { ?s0 :brothers/rdf:rest*/rdf:first ?b . }\
", function(err, graph) {
console.log(JSON.stringify(graph));
})
})
})
Output:
[{"s0":{"token":"uri","value":"#this/Bob"},"fresh:0":{"token":"blank","value":"_:1"},"fresh:1":{"token":"blank","value":"_:1"},"b":{"token":"uri","value":"#this/Jim"}}]
Not sure where the problem is. Either RDF lists are not correctly supported or the *
is the problem.