-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
ExprTransformVirtualBnodeUris correctly transforms
SELECT * { ?s ?p ?o FILTER(?s = <bnode://foo>) }
into
SELECT * { ?s ?p ?o FILTER(bnodeLabel(?s) = "foo") }
But when specifying a set of bnode IRIs as a VALUES block such as VALUES ?s { <bnode://foo> <bnode://bar> }
then filter conditions are not updated and/or injected appropriately.
One solution using our custom bnode function would be to rename VALUE block variables which may be become bound to bnode IRIs and then add a subsequent BIND statement afterwards:
VALUES ?s { <bnode://foo> <bnode://bar> }
becomes
VALUES ?sRaw { <bnode://foo> <bnode://bar> }
BIND(if(strstarts(str(?s), 'bnode://'), norse:bnode.asGiven(extractLabel(?s), ?sRaw) AS ?s)
The portable approach would be to still rename the variables of the VALUES blocks but then add appropriate FILTER statements to the graph patterns:
VALUES ?sRaw { ... }
?s ?p ?o
FILTER (toBnodeIri(?s) = ?sRaw)
Metadata
Metadata
Assignees
Labels
No labels