declare function local:rdf_property ($property, $id as xs:string) {
let $propName := $property/name()
let $value := $property/text()
for $val where {
bind(?value as ?val)
}
construct {<{$id}> <{$propName}> {$val}}
};
()
fails with
line 4:11 no viable alternative at input 'where'
line 5:4 mismatched input 'bind' expecting RCURLY
But according to https://rawgit2.com/VladimirAlexiev/xsparql/master/doc/grammar.xhtml#sparqlForClause, bind is allowed in where.
Commenting out the bind shows that is the selected grammar branch:
xsparql -a test.xsparql
....
XSPARQL FOR from 4:6
T_LET
$_aux_results1
T_FUNCTION_CALL
_xsparql:_sparqlQuery
T_PARAMS
T_FUNCTION_CALL
fn:concat
T_PARAMS
$_sparql_prefixes
SELECT $val
where { }
deleteNode
What is going on?
fails with
But according to https://rawgit2.com/VladimirAlexiev/xsparql/master/doc/grammar.xhtml#sparqlForClause,
bindis allowed inwhere.Commenting out the
bindshows that is the selected grammar branch:What is going on?