W3C home > Mailing lists > Public > public-qt-comments@w3.org > December 2015

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

From: <bugzilla@jessica.w3.org>
Date: Tue, 15 Dec 2015 15:38:55 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29277-523-ogEZsd3fYq@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29277

--- 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
file:///home/jonathan/project/WWW/XML/Group/qtspecs/specifications/xquery-31/html/shared-31.html#id-eval-function-call
 5.b.i., and functions written in XQuery or XPath are treated under 5.b.ii.:

<quote>
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 !!!
</quote>

Built-in is a defined term:

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

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

This archive was generated by hypermail 2.3.1 : Tuesday, 15 December 2015 15:39:00 UTC