Features: xquery-function-import

nw-import-functions-002

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

Test 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:t="http://xproc.org/ns/testsuite/3.0"
                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>

Revision history

10 Jan 2025, Achim Berndzen
Marked feature on test.
06 Dec 2024, Norm Tovey-Walsh
This test should fail statically.
06 Dec 2024, Norm Tovey-Walsh
Tests for p:import-functions.