Hi,
i'd like to execute a function (which I wrote in an .xqm module) with an fn:function-lookup call.
This function has no %rest:path annotation and seems to be unavailable from the current context function list (I inpected it with an inspect:context//function call).
Is there a way to "force" its loading?
I am currently working with the last BaseX8.2.2 war version.
Thanks.
Regards,
Jérôme
Bonjour Jérôme,
I am having trouble to replicate the issue. I just tried the inspect:functions() call from an xqm module and I am having no trouble seeing the functions from another XQuery module. Did you import the module? Could you maybe send a SSCCE (http://sscce.org/), so that we can easily see the problem ourself?
Cheers Dirk
On 07/09/2015 03:46 PM, Jérôme Chauveau wrote:
Hi,
i'd like to execute a function (which I wrote in an .xqm module) with an fn:function-lookup call.
This function has no %rest:path annotation and seems to be unavailable from the current context function list (I inpected it with an inspect:context//function call).
Is there a way to "force" its loading?
I am currently working with the last BaseX8.2.2 war version.
Thanks.
Regards,
Jérôme
Hi Dirk,
thank you for your answer. My previous message was not clear enough... sorry for that. I did not import the module because the function-lookup call is executed from my main module which is not supposed to be modified.
I've just found this message which perfectly matches my scenario: https://mailman.uni-konstanz.de/pipermail/basex-talk/2013-June/005257.html
I am now running an xquery:invoke as a workaround...
Ideally, my main module should be able to list a "plugin" folder then load all module of that one.
Dynamic module loading as I need seems to be not possible - am i right?
Thank you.
Jérôme
Le 09/07/2015 17:12, Dirk Kirsten a écrit :
Bonjour Jérôme,
I am having trouble to replicate the issue. I just tried the inspect:functions() call from an xqm module and I am having no trouble seeing the functions from another XQuery module. Did you import the module? Could you maybe send a SSCCE (http://sscce.org/), so that we can easily see the problem ourself?
Cheers Dirk
On 07/09/2015 03:46 PM, Jérôme Chauveau wrote:
Hi,
i'd like to execute a function (which I wrote in an .xqm module) with an fn:function-lookup call.
This function has no %rest:path annotation and seems to be unavailable from the current context function list (I inpected it with an inspect:context//function call).
Is there a way to "force" its loading?
I am currently working with the last BaseX8.2.2 war version.
Thanks.
Regards,
Jérôme
Hi Jérôme,
With the fn:function-lookup call, as you already guessed, you can only invoke functions that are available in the static context of a query.
However, XQuery 3.1 will provide a new function load-xquery-module. We haven't implemented it yet, as it's still being specified, but feel free to look at the function, and give us some feedback if you think this function is what you would need!
All the best, Christian
[1] http://www.w3.org/TR/xpath-functions-31/#func-load-xquery-module
On Thu, Jul 9, 2015 at 6:07 PM, Jérôme Chauveau jerome.chauveau@unicaen.fr wrote:
Hi Dirk,
thank you for your answer. My previous message was not clear enough... sorry for that. I did not import the module because the function-lookup call is executed from my main module which is not supposed to be modified.
I've just found this message which perfectly matches my scenario: https://mailman.uni-konstanz.de/pipermail/basex-talk/2013-June/005257.html
I am now running an xquery:invoke as a workaround...
Ideally, my main module should be able to list a "plugin" folder then load all module of that one.
Dynamic module loading as I need seems to be not possible - am i right?
Thank you.
Jérôme
Le 09/07/2015 17:12, Dirk Kirsten a écrit :
Bonjour Jérôme,
I am having trouble to replicate the issue. I just tried the inspect:functions() call from an xqm module and I am having no trouble seeing the functions from another XQuery module. Did you import the module? Could you maybe send a SSCCE (http://sscce.org/), so that we can easily see the problem ourself?
Cheers Dirk
On 07/09/2015 03:46 PM, Jérôme Chauveau wrote:
Hi,
i'd like to execute a function (which I wrote in an .xqm module) with an fn:function-lookup call.
This function has no %rest:path annotation and seems to be unavailable from the current context function list (I inpected it with an inspect:context//function call).
Is there a way to "force" its loading?
I am currently working with the last BaseX8.2.2 war version.
Thanks.
Regards,
Jérôme
-- Jérôme Chauveau - CERTIC-DSI - Campus I Université de Caen Basse-Normandie
Hi Christian, Thank you for your answer. You are right! The load-xquery-module function seems to be exactly what I need.
I hope it will be implemented one day.
Regards,
Jérôme
Le 10/07/2015 15:13, Christian Grün a écrit :
Hi Jérôme,
With the fn:function-lookup call, as you already guessed, you can only invoke functions that are available in the static context of a query.
However, XQuery 3.1 will provide a new function load-xquery-module. We haven't implemented it yet, as it's still being specified, but feel free to look at the function, and give us some feedback if you think this function is what you would need!
All the best, Christian
[1] http://www.w3.org/TR/xpath-functions-31/#func-load-xquery-module
On Thu, Jul 9, 2015 at 6:07 PM, Jérôme Chauveau jerome.chauveau@unicaen.fr wrote:
Hi Dirk,
thank you for your answer. My previous message was not clear enough... sorry for that. I did not import the module because the function-lookup call is executed from my main module which is not supposed to be modified.
I've just found this message which perfectly matches my scenario: https://mailman.uni-konstanz.de/pipermail/basex-talk/2013-June/005257.html
I am now running an xquery:invoke as a workaround...
Ideally, my main module should be able to list a "plugin" folder then load all module of that one.
Dynamic module loading as I need seems to be not possible - am i right?
Thank you.
Jérôme
Le 09/07/2015 17:12, Dirk Kirsten a écrit :
Bonjour Jérôme,
I am having trouble to replicate the issue. I just tried the inspect:functions() call from an xqm module and I am having no trouble seeing the functions from another XQuery module. Did you import the module? Could you maybe send a SSCCE (http://sscce.org/), so that we can easily see the problem ourself?
Cheers Dirk
On 07/09/2015 03:46 PM, Jérôme Chauveau wrote:
Hi,
i'd like to execute a function (which I wrote in an .xqm module) with an fn:function-lookup call.
This function has no %rest:path annotation and seems to be unavailable from the current context function list (I inpected it with an inspect:context//function call).
Is there a way to "force" its loading?
I am currently working with the last BaseX8.2.2 war version.
Thanks.
Regards,
Jérôme
-- Jérôme Chauveau - CERTIC-DSI - Campus I Université de Caen Basse-Normandie
basex-talk@mailman.uni-konstanz.de