[Bug 29277] New: [XP31] Evaluating function calls does not mention evaluation of dynamic or static function calls that have no FunctionBody

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

            Bug ID: 29277
           Summary: [XP31] Evaluating function calls does not mention
                    evaluation of dynamic or static function calls that
                    have no FunctionBody
           Product: XPath / XQuery / XSLT
           Version: Member-only Editors Drafts
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XPath 3.1
          Assignee: jonathan.robie@gmail.com
          Reporter: abel.braaksma@xs4all.nl
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

This applies to section 3.1.5.1 Evaluating Static and Dynamic Function Calls.

Assume a dynamic function call like $fun(x) where $fun := node-name#1. Then
going over this section gives us:

1. arity: 1
2. gets us to 2.b, a sequence of node-name#1, F is set to node-name#1.
3. x is evaluated against DC, giving a node Q{}x
4. node is converted to node
5.a does not apply (not an implementation-dependent function)
5.b does not apply (there is no function body)

Since this section is about function *evaluation*, and both 5.a and 5.b end
with statements describing said evaluation, it seems open-ended what happens
with other function calls.

I propose to add 5.c with something like "If F's implementation does not have a
FunctionBody" etc. Or: "If F's implementation is a Core Function then that
function is evaluated as described in FO31 for that function".

Note that in step 4, potentially function coercion can take place, resulting in
an implicit function body, but that is not the case here. Item 5.b does not
explicitly say that it also applies to an implicit function body, it seems to
only reference the FunctionBody production itself. Should it apply to bodies
resulting from function coercion?

In addition, this section does not seem to clearly differentiate where the DC
comes from. I would assume the DC is set with respect to the focus of wherever
a dynamic function call expression is, but this is not said in section 3.2.2
Dynamic Function Call, nor under section 3.1.6 Named Function References.

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

Received on Wednesday, 11 November 2015 04:46:32 UTC