This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
I disagree with the expected result of the test, and don't think the description matches the test. The loaded module has no context item declaration, therefore doesn't place any restrictions on the context item type. When the module is compiled, the compiler introduces dynamic type checking for the assignment declare variable $cim:context as node() := .; which will trigger an XPTY0004 if $cim:context happens to be evaluated. <test-case name="fn-load-xquery-module-060"> <description>Checks for an error when calling fn:load-xquery-module and providing the wrong type of value for the context item.</description> <created by="Debbie Lockett" on="2015-06-01"/> <module uri="http://www.w3.org/fots/fn/load-xquery-module/context-item/module" file="load-xquery-module/context-item2-module.xqm"/> <test>fn:load-xquery-module("http://www.w3.org/fots/fn/load-xquery-module/context-item/module", map{"context-item" : "item"})</test> <result> <error code="FOQM0005"/> </result> </test-case> xquery version "3.1"; module namespace cim = "http://www.w3.org/fots/fn/load-xquery-module/context-item/module"; declare variable $cim:context as node() := .; declare function cim:get-context-child() as node()* { $cim:context/child::node() };
I agree. (We're passing this one because we redirect XPTY0004 to FOQM0005 rather indiscriminately, which is going to catch quite a few cases that shouldn't be caught).
Now fixed.