Dear Jeff,
Afair, UserFunc should never be evaluated when calling a Java function. Do you have an sscce for demonstrating your use case?
By extending the QueryModule class, you are getting access to all internal query process information, and the current context is one of them. As you already guessed, it can be retrieved via "context.value".
Another alternative is to pass on the current context as argument..
Q{java:.....}func(.)
Best, Christian ___________________________
On Wed, Jan 30, 2013 at 6:40 PM, Lansing, Jeff J CIV SPAWARSYSCEN-PACIFIC, 56250 jeff.lansing@navy.mil wrote:
It seems that there is no way for a Java user function installed in the Repository to get access to the current context node. Yes the context is available because of extending abstract QueryModule, but it seems the value of the current context node has been wiped out by the call from UserFunc.value() [at UserFunc:line 170] before it gets to the actual user function [during line 175]. Is there some way for a user function to recover that value, or is this just a limitation of the user function mechanism? Thanks.
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk