[承前]Saxon执行XQuery时的"重复变量(duplicate global variable)"声明问题

作者Michael Kay的一句话惊醒梦中人:

I don't think that reusing the QueryProcessor should be a problem, but you possibly need to make sure that each query has its own StaticContext.

The change you've made to the code seems way out, I think you've misdiagnosed the problem.

所以,每次执行查询的时候都必须新生成StaticQueryContext和DynamicQueryContext

你可能感兴趣的:(variable)