Hi Bob and all, The thing is even more strange if you bring FunctionContext and NamespaceContext in the context. :-) Both of these would be much more appropriate to be referenced from an XPath, than a VariableContext is. Normally, one doesn't change functions or namespace prefix bindings from evaluation to evaluation, while variable values are indeed likely to vary.
Jan Bob wrote: | > As I understand from the javadoc, an XPath object can be viewed as a | > 'precompiled' xpath expression, that can be used for successive | > evaluations, which will increase performance. However, in my case, the | > same XPath object will be used by lots of concurrent threads (I assume | > this is possible), where each thread has its own variables. However, in | > Jaxen, a specific VariableContext is tied to an XPath instance! | > | > This is a problem for me, because I have to create a new XPath instance | > each time, which I think will be costly because of expression parsing. | > It seems an unnecessary restriction of Jaxen, or am I missing something | > here? | | Hello committers of Jaxen-- | | This man seems to speak the truth. At one point, when we had both | JaXPath and BaseXPath, we had flavors of the evaluation methods | that were public and accepted a Context, to allow for this multi-threaded | use-case of jaxen XPath trees. I think. | | Or am I getting old and senile? | | There's no reason internally we can't support this. | | I know Context/ContextSupport as marked as 'not for general use', but | that's seeming wrong now. | | Anyone remember why we don't have: | | selectNodes(Object root, Context context) | | or something? | | -bob | | | | ------------------------------------------------------- | This sf.net email is sponsored by:ThinkGeek | Welcome to geek heaven. | http://thinkgeek.com/sf | _______________________________________________ | Jaxen-interest mailing list | [EMAIL PROTECTED] | https://lists.sourceforge.net/lists/listinfo/jaxen-interest ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Jaxen-interest mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jaxen-interest