Re: "external function" vs "implementation-defined function"

I'm sorry, I have very little idea what the distinction is that you are trying to make.

If we consider the set of functions that are available to the user, but not defined in our specifications, then I can classify them:

(a) according to whether they arrive bundled with the query processor by the vendor, or are written by the user, or are written by a third party. I don't think this is a useful distinction for us to make, since there are no necessary technical differences between these categories.

(b) according to whether they are declared in a "declare function external" declaration. (I've never quite understood the point of such declarations, and Saxon ignores them).

I don't know what the "query environment" is, and I have no idea which of these functions are within it or outside it (surely everything not in the query itself is by definition in its environment?)

Michael Kay
Saxonica

P.S. It looks as if I will be a few minutes late for the call. I'm sitting in a garage waiting for my car to be ready...



> On 9 Feb 2016, at 15:36, Robie, Jonathan <jonathan.robie@emc.com> wrote:
> 
> I did not change the definition for external function, but it probably needs to be changed. Here is the text from the CR, which says that implementation-defined functions are a kind of external function in the sentence immediately after the definition:
> 
> [Definition: External functions are functions that are implemented outside the query environment.] For example, an XQuery implementation might provide a set of external functions in addition to the core function library described in [XQuery and XPath Functions and Operators 3.1]. External functions are identified by the keyword external. 
> 
> If you believe that, then at least some functions provided by the implementation (I assume those must be implementation-defined functions) are implemented outside the query environment.
> 
> I think your suggestion is a good one, implementation-defined functions should be a distinct category, disjoint from external functions.  I would suggest we replace the above definition with the following definition:
> 
> XQuery:
> 
> [Definition: External functions are functions that are neither *built-in functions* nor *implementation-defined functions".] External functions are identified by the keyword external. 
> 
> XPath:
> 
> [Definition: External functions are functions that are neither *built-in functions* nor *host language functions".] External functions are identified by the keyword external. 
> 
> Let's discuss in today's call.
> 
> Jonathan
> 
> 

Received on Tuesday, 9 February 2016 15:48:43 UTC