[Bug 29858] New: [XP31] Named Function References - context information

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

            Bug ID: 29858
           Summary: [XP31] Named Function References - context information
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: XPath 3.1
          Assignee: jonathan.robie@gmail.com
          Reporter: mike@saxonica.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

In 3.1.6 it is written:

Furthermore, if the function referenced by a NamedFunctionRef has an
implementation-dependent implementation, then the implementation of the
function returned by the NamedFunctionRef is associated with the static context
of this NamedFunctionRef expression and to the dynamic context in which it is
currently being evaluated.

Two editorial problems here:

(a) I don't think any distinction is intended between "associated with" and
"associated to". XDM says that a function implementation is optionally
"associated with" a static and dynamic context.

(b) It's not clear what the referent of the final "it" is (and the ambiguity
here is dangerous).

I think there's a slightly deeper problem, and it lies in the definition "A
named function reference denotes a named function." Well, it doesn't - it is an
expression which is evaluated to return a "function" in the XDM sense; this
function will have a name, but it will also have other properties, and those
properties are not simply the properties of the function as found in the static
context.

So I suggest

(i) Change the definition to

[Definition: A named function reference is an expression that evaluates to a
function. The name and arity of the function reference must correspond to a
function signature found in the static context of the expression and to a
function found in the *function names* component of the dynamic context.] 

To uniquely identify a particular named function, both its name as an expanded
QName and its arity are required.

Delete: [Definition: A named function is a function defined in the static
context for the expression.]

(ii) Change the above para to:

Furthermore, if the function returned by the evaluation of a NamedFunctionRef
has an implementation-dependent implementation, then the implementation of this
function is associated with the static context of this NamedFunctionRef
expression and with the dynamic context in which the NamedFunctionRef is
evaluated.

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

Received on Thursday, 22 September 2016 12:02:04 UTC