Loading TOC...

XDMP-CTXTDEP

W3C XQuery Standard Equivalent: err:XPST0112

Message Text

Function is context dependent: variable1

Cause

You cannot dynamically call a function passed as a value if it depends on aspects of the context in order to execute. Only built-in functions can depend on the context in this way.

Response

You might be able to use another version of the same function where you can explicitly provide the information otherwise used from the context. Or you might want to wrap your call to the function in an explicit inline function such as function($a,$b) { starts-with($a,$b) }.

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.