[Bug 29937] New: [QT3TS] fn-load-xquery-module-060

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29937

            Bug ID: 29937
           Summary: [QT3TS] fn-load-xquery-module-060
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3 & XPath 3 Test Suite
          Assignee: oneil@saxonica.com
          Reporter: tim@cbcl.co.uk
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

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()
};

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 13 October 2016 15:23:35 UTC