0
votes

The following xquery code runs into the error „Context is undeclared“. I am using BaseX v9.1.2.

enter image description here

How is it possible that this error happens there?

1

1 Answers

0
votes

In your return statement, there is no context for the XPath to be applied. Use the $el variable bound in your loop:

return <key-val><key>{ data($el/as:SERVICE-INSTANCE-REFS/...