This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29930 - [FO31] 16.3.1 fn:load-xquery-module
Summary: [FO31] 16.3.1 fn:load-xquery-module
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 3.1 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-11 17:19 UTC by Tim Mills
Modified: 2016-12-16 19:55 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2016-10-11 17:19:27 UTC
This function defines an error condition:

"If the imported module requires a value for the initial context item or for an external variable, and no value is supplied, an error is raised [err:FOQM0004]"

It doesn't explain what it means for a module to require a value for the initial context item or for an external variable.  Indeed, in XQ31, it's permissible not to supply a a value for an external variable, and it is handled as a dynamic error, since

"A reference to a variable that was declared external, but was not bound to a value by the external environment, raises a dynamic error [err:XPDY0002]."

and

"If the context item is absentDM31, a context item expression raises a dynamic error [err:XPDY0002]."

Furthermore, since

"Only the main module can set the value of the initial context item. In a library module, a context item declaration must be external, and specifies only the static type. Specifying a VarValue or VarDefaultValue for a context item declaration in a library module is a static error [err:XQST0113]."

and

"In every module that does not contain a context item declaration, the effect is as if the declaration"

then wouldn't every library module "require" a value to be supplied for the context item.
Comment 1 Michael Kay 2016-10-18 15:42:09 UTC
The WG accepted the proposal.
Comment 2 Michael Kay 2016-10-18 22:31:16 UTC
I have made the spec changes.

Changes still need to be made to tests.