[xquery-talk] context item in module variable

Michael Kay mike at saxonica.com
Mon Oct 14 05:19:23 PDT 2013


On 14 Oct 2013, at 12:43, Benito van der Zander wrote:

> 
>> XQuery 3.0 is explicit that all modules share the same initial context item:
>> 
>> [Definition: The initial context item is a context item that an implementation can set before processing a query begins. The query body and the prolog of every module in a query share the same initial context item.]
> 
> I had read that before,  which is why the post is about XQuery 1...
> 
> Then perhaps the test should have a XQuery 3 dependency?

If you think so, then you are free to challenge the test by raising a bug report.
> 
> (My implementation evaluates all variables in a module only once and then shares the cached value with all
> queries that import the module; much more logical like compile and link in traditional languages)
> 

I don't think that was the intent of the 1.0 spec, but I agree that the spec was not clear on the point. If you raise a bug against the test then the WG will have to make a decision on the question.

Michael Kay
Saxonica




More information about the talk mailing list