This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
C.2 Dynamic Context Components On the row for the "Function implementations" component, the Scope is given as "global". This should be "module". Note that that component is required to be consistent with the function signatures component of the static context, whose Scope is given as "module".
There are only two values defined for the "scope" of a component in the dynamic context: "global" and "dynamic". They are defined like this: Scope: Indicates where the component is applicable. "Global" indicates that the component applies globally, throughout all the modules used in a query, and remains constant during evaluation of a query. "Dynamic" indicates that evalation of an expression may influence the value of the component for that expression and for nested expressions. The function implementations component is constant during the evaluation of a query, so I think that under these definitions it is global. But "Fixed" would be a better term. Actually, I see very little point in modelling "function implementations" as part of the dynamic context. In fact, I think it's positively misleading: I think most processors are likely to take advantage of the fact that function implementations are known at compile time, or at the very latest at link time.
(In reply to comment #1) > There are only two values defined for the "scope" of a component in the > dynamic context: "global" and "dynamic". Hm, so it is. (However, note that according to 2.1.2, the dynamic context contains all the components of the static context, so it's somewhat unclear what happens to those components when they have "module" or "lexical" scope.) > They are defined like this: > > Scope: Indicates where the component is applicable. "Global" indicates that > the component applies globally, throughout all the modules used in a query, > and remains constant during evaluation of a query. I find this definition unsatisfying. The wording, in which a context component "applies" (or "is applicable") somewhere, isn't really explained. (As far as I can tell, it isn't used anywhere else in the spec.) (Moreover, in language specs, "scope" usually has to do with the visibility of declared identifiers (e.g., "in-scope variables"), which isn't the case here.) > "Dynamic" indicates that evalation of an expression may influence the > value of the component for that expression and for nested expressions. (Just noticed the typo: "evalation" for "evaluation".) > The function implementations component is constant during the evaluation of > a query, so I think that under these definitions it is global. > > But "Fixed" would be a better term. That might convey the intent better, except that putting it under the heading of "Scope" (suggesting "fixed scope" or "scope is fixed") would probably give the wrong impression. > Actually, I see very little point in modelling "function implementations" as > part of the dynamic context. In fact, I think it's positively misleading: I > think most processors are likely to take advantage of the fact that function > implementations are known at compile time, or at the very latest at link > time. I'm inclined to agree. I don't think moving "function implementations" to the static context would have any ill effects.
Michael, The Query Working Group considered this bug report on 15 April 2008. The working group agrees that "fixed" or "static" would be a more descriptive term for the scope of a function implementation than the current term "global." However, the consensus of the working group was that this issue does not rise to the level of an error that needs to be corrected by publishing an erratum at this time. In a future version of the XQuery specification, we will consider revising the scope categories for dynamic context components. If you are satisfied with this resolution, please mark this bug report as Closed. Regards, Don Chamberlin (for the query working group)