Closed k00ni closed 7 years ago
That was missing in the spec back then and is still correct behavior, I think. See [1]:
Blank nodes in graph patterns act as variables, not as references to specific blank nodes in the data being queried
If you want to use blank nodes as explicit identifiers in a query, ARC2 offers an extension to the spec that allows you to mask bnodes as URIs:
$res = $this->store->getStore()->query('SELECT * FROM <http://some/graph/> WHERE {
<'. $res['result']['rows'][0]['blank'] .'> ?p ?o.
}');
The query above should do the trick (note the <
and >
around the bnode). That is off-standard, however.
[1] https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#QSynBlankNodes
I really hope i am wrong, but it seems that ARC2 can't handle blank nodes using query function.
It outputs the following:
I expect the result only has two entries: