[Bug 23488] context item in module

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23488

--- Comment #6 from Benito van der Zander <benito@benibela.de> ---
> In XQuery 3.0 it is made clear that there is not one context item per module

I only consider XQuery 1 (after all the test does not have a XQ3 dependency)

There it says:

"Each module has its own static context. " and "During evaluation of a function
body, the static context and dynamic context for expression evaluation are
defined by the module in which the function is declared, which is not
necessarily the same as the module in which the function is called." and
"[Definition: If a variable declaration includes an expression, the expression
is called an initializing expression.] The initializing expression for a given
variable must be evaluated before the evaluation of any expression that
references the variable. The static context for an initializing expression
includes all functions that are declared or imported anywhere in the Prolog,
but it includes only those variables and namespaces that are declared or
imported earlier in the Prolog than the variable that is being initialized. The
context item, position, and size in the dynamic context of the initializing
expression have initial values as described in C.2 Dynamic Context Components." 

So you have one static context for every module, and during function evaluation
one dynamic context for every module, and you need to create a dynamic context
for the evaluation of the initializing variables of the module, so the logical
conclusion is that you also  have one dynamic context for every module during
variable evaluation. And the context item in that context could then be called
the context item of the module.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 17 October 2013 00:03:11 UTC