nw-import-functions-020

Tests p:import-functions: Test function imported locally imported function is not visible in other step.

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

It requires the following features: xquery-function-import.

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:output port="result"/>
   <p:declare-step type="test:step">
      <p:import-functions href="../documents/xquery-library.xq" content-type="application/xquery"/>
      <p:output port="result"/>
      <p:identity>
         <p:with-input>
            <result>{test:function1()}</result>
         </p:with-input>
      </p:identity>
   </p:declare-step>
   <p:declare-step type="test:step1">
      <p:output port="result"/>
      <p:identity>
         <p:with-input>
            <result>{test:function1()}</result>
         </p:with-input>
      </p:identity>
   </p:declare-step>
   <test:step1/>
</p:declare-step>
XML Calabash passing

Revision history

05 Dec 2024, Norm Tovey-Walsh

Tests for p:import-function; adapted from ab-import-functions-020 but uses an XQuery library module.