Hi, I'm a bit confused about the combination of the test cases fn-function-lookup-759 and fn-function-lookup-761.
The fn-function-lookup-759 says that in any case you should be able to lookup for the function load-xquery-module:
<test-case name="fn-function-lookup-759"
covers="fn-load-xquery-module">
<description>Attempts to look up function fn:load-xquery-module#1.</description>
<created by="Tim Mills" on="2016-08-19"/>
<dependency type="spec" value="XP31+ XQ31+"/>
<test>exists(function-lookup(fn:QName('http://www.w3.org/2005/xpath-functions', 'load-xquery-module'), 1))</test>
<result>
<assert-true/>
</result>
</test-case>
Reminder:
The function signature of load-xquery-module#1 is fn:load-xquery-module($module-uri as xs:string) as map(*).
The test case fn-function-lookup-761 says now if you do not support the feature fn-load-xquery-module and make the same lookup as in fn-function-lookup-759 but now call the function with a wrong typed argument, this function must throw an error code FOQM0006:
On my point of view, the error code XPTY0004 for the failed type conversion should be also acceptable, shouldn't it? Otherwise the function returned by function-lookup(fn:QName('http://www.w3.org/2005/xpath-functions', 'load-xquery-module'), 1) must have a signiture which is more lax as the specification requires.
Hi, I'm a bit confused about the combination of the test cases
fn-function-lookup-759
andfn-function-lookup-761
.The fn-function-lookup-759 says that in any case you should be able to lookup for the function
load-xquery-module
:Reminder: The function signature of load-xquery-module#1 is
fn:load-xquery-module($module-uri as xs:string) as map(*)
.The test case fn-function-lookup-761 says now if you do not support the feature fn-load-xquery-module and make the same lookup as in
fn-function-lookup-759
but now call the function with a wrong typed argument, this function must throw an error codeFOQM0006
:On my point of view, the error code
XPTY0004
for the failed type conversion should be also acceptable, shouldn't it? Otherwise the function returned byfunction-lookup(fn:QName('http://www.w3.org/2005/xpath-functions', 'load-xquery-module'), 1)
must have a signiture which is more lax as the specification requires.