nw-import-functions-002

Tests p:import-functions: tests limiting XQuery imports by namespace.

Test nw-import-functions-002.xml is expected to fail with error code err:XS0107.

The pipeline


<p:declare-step xmlns:err="http://www.w3.org/ns/xproc-error" xmlns:p="http://www.w3.org/ns/xproc" xmlns:test="http://xproc.org/ns/testsuite/3.0/function-test" version="3.0">
   <p:import-functions href="../documents/xquery-library.xq" namespace="http://example.com/1 http://example.com/1" content-type="application/xquery"/>
   <p:output port="result"/>
   <p:try>
      <p:identity>
         <p:with-input>
            <result>{test:function1()}</result>
         </p:with-input>
      </p:identity>
      <p:catch code="err:XS0107">
         <p:identity>
            <p:with-input>
               <correct/>
            </p:with-input>
         </p:identity>
      </p:catch>
   </p:try>
</p:declare-step>
XML Calabash passing

Revision history

06 Dec 2024, Norm Tovey-Walsh

This test should fail statically.

06 Dec 2024, Norm Tovey-Walsh

Tests for p:import-functions.