[Bug 2977] Handling of external function declarations

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2977


chamberl@almaden.ibm.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED




------- Comment #1 from chamberl@almaden.ibm.com  2006-03-14 23:50 -------
Frans,
On 14 March 2006, the Query Working Group discussed your suggestion. The
working group believes that errors in external functions should be raised when
the function is called rather than when it is declared. The working group
decided to make the following changes to the XQuery specification:

(1) Add a consistency constraint to Section 2.2.5 (following the constraint
on external variables: "For each function declared as external: the [function
implementation] must either return a value that matches the declared result
type, using the matching rules in [2.5.4 SequenceType Matching], or raise an
implementation-defined error."

(2) In Section 3.1.5 (Function Calls), Rule 4, change "If the function is
a user-declared function" to "If the function is a user-declared function
that has a body".

(3) In Section 3.1.5 (Function Calls), add a new Rule 5: "If the function
is a user-declared external function, its [function implementation] is 
invoked with the converted argument values. The result is either a value
of the declared type or an [implementation-defined] error (see [2.2.5
Consistency Constraints]).

(d) In Appendix E (Implementation-Defined Items), add a new entry: 
The result of an unsuccessful call to an external function (for example,
if the function implementation cannot be found or does not return a value
of the declared type).

Since we believe that these changes address your concerns, I have marked this
Bugzilla entry as "Fixed". If you are satisfied with this resolution, please
change the status of the Bugzilla entry to "Closed". If you take no action, the
working group will close this entry at the end of March.

Regards,
Don Chamberlin (for the Query Working Group)

Received on Tuesday, 14 March 2006 23:50:46 UTC