[Bug 4321] Importing the types used in the signature of an imported function

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

           Summary: Importing the types used in the signature of an imported
                    function
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


The specification says:

<quote>
It is a static error [err:XQST0036] to import a module if the importing
module's in-scope schema types do not include definitions for the schema type
names that appear in the declarations of variables and functions (whether in an
argument type or return type) that are present in the imported module and are
referenced in the importing module.
</quote>

This says nothing about a function declared as, say,

declare function f:foo($param as schema-element(f:bar)) {
  ...
}

I believe that the logic that led us to introduce XQST0036 applies equally in
this case, and that the error should be generalized to require the calling
module to import the schema containing the element declaration f:bar.

Received on Tuesday, 13 February 2007 14:10:52 UTC