The rewriting rules are not applied when prefixing the namespace with "java:". Perhaps there's a typo in you mail.
Perhaps try
import module namespace m = "java:opennlp.tools.cmdline.CLI";
Cheers Kristian K
04.03.2017 19:14 meumapple kirjutas:
Hi Christian,
I have read the page. My classes have a dot in their names, and I suspect this creates a conflict with the rewriting rules. Is that correct? Thanks.
Best, Joseph
Il giorno 03 mar 2017, alle ore 15:55, Christian GrĂ¼n christian.gruen@gmail.com ha scritto:
Hi Joseph,
As a primer, I invite you to have a look at our Wiki page on Java bindings [1].
Cheers, Christian
[1] http://docs.basex.org/wiki/Java_Bindings
On Fri, Mar 3, 2017 at 3:33 PM, meumapple meumapple@gmail.com wrote: Hi,
I have a java parser (opennlp-tools-1.7.2.jar) whose main class is "opennlp.tools.cmdline.CLI"
At the command line I run it with opennlp POSTagger mymodel.bin (opennlp is a bash script running the abovementioned jar file). After that I am asked interactively for the text to parse.
Is it possible to invoke the command from XQuery via java bindings? I have put the opennlp jar files in the repo folder and I have tried "import module namespace m = "java.opennlp.tools.cmdline.CLI;" but the I get the "module not found error"
Thanks! Joseph