Hi there,
I am using basex 6.2.7 (gui version) from the maven repo.
Using eval (see below) gives me: Fehler: [XPST0017] Unknown function "local:name1(...)".
If I call local:name1() directly, it works. Running the same script with Saxon (using saxon:evaluate) works, too.
declare function local:name1() { let $msg := "hello from name1" return <msg>{$msg}</msg> };
declare function local:dispatch($e as element()) { let $func := local-name($e) let $res := basex:eval(concat("local:", $func, "()")) return $res };
let $elem := <name1>bla</name1> (: return local:name1() :) return local:dispatch($elem)
Regards,
Max