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


--- Comment #16 from Jonathan Robie <jonathan.robie@gmail.com> ---
(In reply to Michael Kay from comment #14)
> One of the problems here is making the rules host-language independent. For
> a user-defined function in XSLT, the implementation is not (syntactically) a
> FunctionBody, but it's equivalent to a FunctionBody as far as the XPath
> engine is concerned.

XPath and XQuery define specific languages, and do not define a concept like
"equivalent to a FunctionBody as far as the XPath engine is concerned".

I think it is better to distinguish:

1. external functions
2. host language functions
3. implementations of functions in the F&O library
4. functions written in the language of the XQuery or XPath specification

>From a language perspective, 1-3 are treated the same way in the current text
of the XPath specification, under
 5.b.i., and functions written in XQuery or XPath are treated under 5.b.ii.:

b. If FC is not a partial function application:

i. If F's implementation is implementation-dependent (e.g., it is a built-in
function or external function or host-language-dependent function, or a partial
application of such a function):

!!! SNIP !!!

ii. If F's implementation is a FunctionBody:
The FunctionBody is evaluated. The dynamic context for this evaluation is
obtained by taking the dynamic context of the module InlineFunctionExpr that
contains the FunctionBody, and making the following changes:

!!! SNIP !!!

Built-in is a defined term:

[Definition: The *built-in* functions supported by XQuery 3.1 are defined in
[XQuery and XPath Functions and Operators 3.1].] 

This seems correct to me. What exactly needs fixing?

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

Received on Tuesday, 15 December 2015 15:39:00 UTC