Skip to content

bind not allowed in where ??? #44

Description

@VladimirAlexiev
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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions