Hello,
I am trying to add some external features to BaseX, and would like to use them into a BaseX client XQUERY module. I can't see any simple way to do it, is there any ?
Here is the scenario : suppose that you want to add a super-mega map module to BaseX, let us call it supermegamap, that is a collection of functions : supermegamap:new, supermegamap:contains, supermegamap:get.
I would like to use my supermegamap through BaseX via a xquery module : let $my_supermegamp := supermegamap:new().
I see only two quite not very handy ways to do this :
1) The first one is to use JAVA bindings. Ok, it will work, but is not really elegant. 2) The second one is to fork BaseX code : adding the JAVA code to BaseX, modifying the file Function.JAVA. That might work, should be efficient, but it is quite heavy, and overall, will be most probably a dead-code the next time I will have to upgrade BaseX.
Is there any alternative way ?
Thx
Jean-Marc
On 30 December 2013 12:03, jean-marc Mercier wrote:
Hi Jean-Marc,
I see only two quite not very handy ways to do this :
- The first one is to use JAVA bindings. Ok, it will work, but is
not really elegant.
- The second one is to fork BaseX code : adding the JAVA code to
BaseX, modifying the file Function.JAVA. That might work, should be efficient, but it is quite heavy, and overall, will be most probably a dead-code the next time I will have to upgrade BaseX.
Is there any alternative way ?
If I understand correctly, you want to use an extension library module, written in Java, from another XQuery module. The following page on BaseX wiki document how to do it with a package:
http://docs.basex.org/wiki/Repository#EXPath_Packaging
Regards,
Hi Jean-marc,
Have you looked at using the repository? [1] There is a more complex example at [2]
Regards /Andy
[1] http://docs.basex.org/wiki/Repository#Java [2] http://files.basex.org/modules/org/basex/modules/StringSimilarity/
On Mon, Dec 30, 2013 at 11:03 AM, jean-marc Mercier < jeanmarc.mercier@gmail.com> wrote:
Hello,
I am trying to add some external features to BaseX, and would like to use them into a BaseX client XQUERY module. I can't see any simple way to do it, is there any ?
Here is the scenario : suppose that you want to add a super-mega map module to BaseX, let us call it supermegamap, that is a collection of functions : supermegamap:new, supermegamap:contains, supermegamap:get.
I would like to use my supermegamap through BaseX via a xquery module : let $my_supermegamp := supermegamap:new().
I see only two quite not very handy ways to do this :
- The first one is to use JAVA bindings. Ok, it will work, but is not
really elegant. 2) The second one is to fork BaseX code : adding the JAVA code to BaseX, modifying the file Function.JAVA. That might work, should be efficient, but it is quite heavy, and overall, will be most probably a dead-code the next time I will have to upgrade BaseX.
Is there any alternative way ?
Thx
Jean-Marc
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Hi,
@Andy, @Florent,
Thx for answering !
@Andy. I know a little bit the repository. Indeed, I am using it to add Java bindings to BaseX. However, I am looking to an alternative solution. @Florent. Thanx for pointing me this link, it seems to be exactly what I am looking for.
Cheers,
Jean-Marc
2013/12/30 Andy Bunce bunce.andy@gmail.com
Hi Jean-marc,
Have you looked at using the repository? [1] There is a more complex example at [2]
Regards /Andy
[1] http://docs.basex.org/wiki/Repository#Java [2] http://files.basex.org/modules/org/basex/modules/StringSimilarity/
On Mon, Dec 30, 2013 at 11:03 AM, jean-marc Mercier < jeanmarc.mercier@gmail.com> wrote:
Hello,
I am trying to add some external features to BaseX, and would like to use them into a BaseX client XQUERY module. I can't see any simple way to do it, is there any ?
Here is the scenario : suppose that you want to add a super-mega map module to BaseX, let us call it supermegamap, that is a collection of functions : supermegamap:new, supermegamap:contains, supermegamap:get.
I would like to use my supermegamap through BaseX via a xquery module : let $my_supermegamp := supermegamap:new().
I see only two quite not very handy ways to do this :
- The first one is to use JAVA bindings. Ok, it will work, but is not
really elegant. 2) The second one is to fork BaseX code : adding the JAVA code to BaseX, modifying the file Function.JAVA. That might work, should be efficient, but it is quite heavy, and overall, will be most probably a dead-code the next time I will have to upgrade BaseX.
Is there any alternative way ?
Thx
Jean-Marc
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
basex-talk@mailman.uni-konstanz.de