Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support RDF lists correctly #142

Open
kiritsuku opened this issue Sep 11, 2016 · 0 comments
Open

Support RDF lists correctly #142

kiritsuku opened this issue Sep 11, 2016 · 0 comments

Comments

@kiritsuku
Copy link

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.

@kiritsuku kiritsuku changed the title Support rdf:first and rdf:rest correclty Support RDF lists correctly Sep 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant