Hi,
I get a “duplicate declaration” error-message when I using the inspect:functions-function.
Consider program: testRun1-2a.xq. The program imports module: module1.xqm and module2a.xqm.
Module: module1.xqm, declares a variable: $mod1:x, and a function: mod1:show( $x).
Module: module2a.xqm, declare a function: mod2a:run, which calls a function by a given function-name: $name in a dynamically imported module by a given module-uri: $uri.
Program: testRun1-2a.xq, calls the run-function in module2a and tells it to use variable: $mod1:x, on function: mod1:show in module: module1.xqm.
This triggers an error: Duplicate declaration on static variable $mod1:x.
On the other hand, program: testRun1-2b.xq, does exactly the same except that module:module2b.xqm, is statically linked to module: module1.xqm, instead of dynamically as happens in module:module2a.xqm.
Shouldn’t the dynamically import of modules behave in the same manner as its static counterpart?
Is it possible to achieve this?
Cheers,
Rob
PS the examples are a bit awkward but in my real-life program this construction makes sense (to my anyway).
![]() |
Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
|