These two SPARQL queries result in different returns in this SPARQL endpoint (Swedish libraries). Why? I expected them to be functionally equivalent.
Query 1
PREFIX : <https://id.kb.se/vocab/>
SELECT DISTINCT ?language ?langName {
[] :contribution [ a :PrimaryContribution ;
:role rel:author ;
:agent <https://libris.kb.se/qn247n18248vs58#it> ] ;
:translationOf/a :Work ;
:language ?language .
?language :prefLabel ?langName .
FILTER(lang(?langName) = 'sv')
}
Query 2
PREFIX : <https://id.kb.se/vocab/>
SELECT DISTINCT ?language ?langName {
?endeavor :contribution ?c .
?c a :PrimaryContribution ;
:role rel:author ;
:agent <https://libris.kb.se/qn247n18248vs58#it>.
?endeavor :translationOf ?t .
?t a :Work ;
:language ?language .
?language :prefLabel ?langName .
FILTER(lang(?langName) = 'sv')
}
My understanding of 4.14 Blank node is that blank nodes in queries act as variables. I've read this StackOverflow question, and I know that two blank nodes in a SPARQL query need not reference the same node, but I do not think that is relevant in this case. Do you have any thoughts on the matter?
The first has:
The second has:
The
:languagepart is on different subject variables.It is
[](corresponds to?endeavorin the second) in the first query and the object of:translationOfin the second.