Hi Christian,
What we want to avoid is explicit module importing. The solution you propose seems to fit our need perfectly!
Thanks for being so reactive,
Jean-Philippe
On Mon, Feb 24, 2014 at 6:32 PM, Christian Grün christian.gruen@gmail.comwrote:
Hi Jean-Philippe,
we are still hesitant to implement a function that dynamically adds all imported functions to the static query context. Such an extension wouldn't allow us anymore to statically determine which of the functions that are used in the XQuery expression do actually exist, and which may be imported at runtime by an import-module call.
However, we could add a function that returns a sequence of all functions declared in a specific module, and which could be browser for a specific function. I have added this idea (inspired by our team member Leo) and an example how to use it to GitHub [1].
Do you (and others) think that this solution would be a viable alternative to the util:import-module function from eXist? Christian
[1] https://github.com/BaseXdb/basex/issues/872
On Mon, Feb 24, 2014 at 4:55 PM, Christian Grün christian.gruen@gmail.com wrote:
Hi Jean-Philippe,
when the evaluated expression yields function items. How should we understand this second limitation? Because modules precisely define functions...
This means that the result of a query may not be a function, as e.g. in the following two examples:
xquery:eval("true#0"), xquery:eval("function() { 1 }")
Hope this helps, Christian