<?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>29935</bug_id>
          
          <creation_ts>2016-10-12 10:12:07 +0000</creation_ts>
          <short_desc>[FO31] 16.3.1 fn:load-xquery-module (FOQM0007)</short_desc>
          <delta_ts>2016-10-19 12:57:24 +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>127748</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-10-12 10:12:07 +0000</bug_when>
    <thetext>The text says:

&quot;If the supplied options are invalid according to the rules of the ·option 
parameter conventions·, a dynamic error is raised [err:FOQM0007].&quot;

However, the rules for option parameters say

&quot;For each named option, the function specification defines a required type for the option value. The value that is actually supplied in the map is converted to this required type using the function conversion rulesXP31. A type error [err:XPTY0004]XP31 occurs if conversion of the supplied value to the required type is not possible, or if this conversion delivers a coerced function whose invocation fails with a type error.&quot;

So for example, test case

  &lt;test-case name=&quot;fn-load-xquery-module-062&quot;&gt;
    &lt;description&gt;Checks for an error when calling fn:load-xquery-module but variables option value has wrong type.&lt;/description&gt;
    &lt;created by=&quot;Debbie Lockett&quot; on=&quot;2015-06-04&quot;/&gt;
    &lt;module uri=&quot;http://www.w3.org/fots/fn/load-xquery-module/valid/module&quot; file=&quot;load-xquery-module/valid-module.xqm&quot;/&gt;
    &lt;test&gt;fn:load-xquery-module(&quot;http://www.w3.org/fots/fn/load-xquery-module/valid/module&quot;, 
      map{&quot;variables&quot; : &quot;v&quot;})&lt;/test&gt;
    &lt;result&gt;
      &lt;error code=&quot;FOQM0007&quot;/&gt;
    &lt;/result&gt;
  &lt;/test-case&gt;

should expect XPTY0004.  FOQM007 would only be raised under the condition

&quot;A dynamic error occurs if the supplied value after conversion is not one of the permitted values for the option in question: the error codes for this error are defined in the specification of each function.&quot;

and I don&apos;t think such a case applies to fn:load-xquery-module, since the specification doesn&apos;t place further constraints on the values of options xquery-version,location-hints, context-item, variables or vendor-options.  Thus FOQM0007 is redundant.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127837</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-10-18 15:45:44 +0000</bug_when>
    <thetext>The WG accepted the change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127851</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-10-19 12:57:05 +0000</bug_when>
    <thetext>Now fixed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>