[Bug 5224] [XQuery] Dynamic context in global variable initializers

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5224





------- Comment #4 from mike@saxonica.com  2008-01-15 23:34 -------
My initial comment was: "There seems to be no statement in XQuery that says
whether the context item, position, and size are defined when referenced within
the initializing expression of a global variable."

It seems that the WG has decided that these are defined, and that they are the
same as the context item, position, and size in the expression that forms the
QueryBody in the main module. It seems to me that the place to say that is in
para 4 of 4.14 Variable Declaration. After "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." add "The dynamic context for an initializing expression is
the same as the dynamic context for the QueryBody in the main module, except
that Variable Values and Function Implementations are populated only for those
variables and functions that are within the static context of the expression".

Received on Tuesday, 15 January 2008 23:34:06 UTC