Open sroze opened 3 years ago
Hello!
I have the same problem here! Queries always return an empty array! :(
@Melchyore rdflib has its own take on SPARQL. One of the things is that it demands a period after statements. Put a period after "?nodeB" in the query above and you'll get data back as expected.
So, I'm going to close this issue, because it was a syntax error in the use case, not a bug.
@jeff-zucker -- I disagree that rdflib
treating a period as required, where it is optional according to SPARQL spec, is not a bug.
Anywhere rdflib
evinces "its own take on SPARQL" (certainly anywhere rdflib
is more stringent, and arguably anywhere rdflib
is more forgiving) is absolutely a bug in rdflib
, and this requirement by rdflib
should be addressed in its code.
Please reopen this issue.
Fair enough, reopened with better title. I wasn't able to find the period mentioned in the spec, can you point me to it? The examples at W3 are inconsistent, sometimes showing a period and sometimes not.
I don't know whether the optionality is ever discussed in the prose. I can't quickly find it. However --
Section 19 contains the normative definition of the syntax for the SPARQL query and SPARQL update languages, as given by a grammar expressed in EBNF notation.
-- and this comes from that Section 19 --
[52] TriplesTemplate ::= TriplesSameSubject ( '.' TriplesTemplate? )?
Note that the '.'
is contained in an element that appears zero or more times (expressed by the trailing ?
). Hopefully that's sufficient....
I'm trying to use a SPARQL query to fetch from my store and it doesn't return any results. Here's a very simple reproducer.
Reproducer