[Bug 2977] Handling of external function declarations

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

           Summary: Handling of external function declarations
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: frans.englich@telia.com
         QAContact: public-qt-comments@w3.org


I think there is a couple of areas concerning external functions that are left
unspecified, that it is not instructed or specified to be implementation
defined/dependent how certain aspects of external functions are handled.

I think it is clear that how the calling conventions to an external function is
carried out is implementation defined. However, some aspects concerning the
actual external declaration is vague. Examples:

How should an implementation treat the following query?

        declare namespace e = "example.org/An ns which is not supported";
        declare function e:notSupported() external;
        1 eq 1

If an implementation may do anything, I think a sentence should say "It is
implementation defined how an external function declaration is handled", or
similar.

Wouldn't it be sensible to require an implementation to raise an error if an
external declaration is encountered that specifies a function it does not
support? That is, that the above query always fails to compile. XPST0017 refers
to invalid function calls; perhaps the scope of that error code could be
widened, or that a new error code is added.

Also, I think the following query encounters similar problems:

        declare function fn:deep-equal(arg as item()*, arg2 as item()*) as
xs:boolean 
external;
        1 eq 1

I don't see it specified how an implementation are supposed to handle it. I
don't see the advantages of not having a strict approach; that the above query
should result in an error. That is, that the 'reserved namespaces' clause
should not only apply to user defined functions, but also external function
declarations.

This was first brought to discussion on public-qt-comments mailinglist, subject
"Intent of 'declare function ... external'".


       Frans

Received on Monday, 6 March 2006 16:30:22 UTC