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 29935 - [FO31] 16.3.1 fn:load-xquery-module (FOQM0007)
Summary: [FO31] 16.3.1 fn:load-xquery-module (FOQM0007)
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-12 10:12 UTC by Tim Mills
Modified: 2016-10-19 12:57 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2016-10-12 10:12:07 UTC
The text says:

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

However, the rules for option parameters say

"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."

So for example, test case

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

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

"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."

and I don't think such a case applies to fn:load-xquery-module, since the specification doesn't place further constraints on the values of options xquery-version,location-hints, context-item, variables or vendor-options.  Thus FOQM0007 is redundant.
Comment 1 Michael Kay 2016-10-18 15:45:44 UTC
The WG accepted the change.
Comment 2 Tim Mills 2016-10-19 12:57:05 UTC
Now fixed.