<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>29930</bug_id>
          
          <creation_ts>2016-10-11 17:19:27 +0000</creation_ts>
          <short_desc>[FO31] 16.3.1 fn:load-xquery-module</short_desc>
          <delta_ts>2016-12-16 19:55:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Functions and Operators 3.1</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Mills">tim</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>127718</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-10-11 17:19:27 +0000</bug_when>
    <thetext>This function defines an error condition:

&quot;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]&quot;

It doesn&apos;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&apos;s permissible not to supply a a value for an external variable, and it is handled as a dynamic error, since

&quot;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].&quot;

and

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

Furthermore, since

&quot;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].&quot;

and

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

then wouldn&apos;t every library module &quot;require&quot; a value to be supplied for the context item.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127836</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-10-18 15:42:09 +0000</bug_when>
    <thetext>The WG accepted the proposal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127844</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-10-18 22:31:16 +0000</bug_when>
    <thetext>I have made the spec changes.

Changes still need to be made to tests.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>