This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Section 4.11 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 variable declarations, function parameters, or function returns found in the imported module. </quote> This constraint seems over-severe in relation to functions and variables that are declared in the imported module but are not referenced in the importing module. The rule as written means that when extra functions or variables are added to an existing library module, an importing module may be invalidated even though it has not changed and makes no reference to the new functions or variables. For vendors of function libraries, this will create quite unnecessary problems in keeping successive releases of the library module backwards compatible with existing client code. (This assumes that "found in" is to be interpreted as "present in". One could argue that the compiler doesn't find functions and variables unless it looks for them, and that there's no requirement to look for functions and variables that aren't referenced. But that seems to be wriggling.) Proposed change: replace the quoted paragraph by: <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> Michael Kay
Mike, On 01 Feb 2006 the Query working group agreed to adopt your suggestion. It will be reflected in the next version of the XQuery language specification. Since you were present at the discussion, I have marked this Bugzilla entry as closed. Regards, Don Chamberlin (for the XQuery working group)