p:import-023 (AB)

Tests p:import gets scope right: test:step-a is not visible in test:step-b

Test is expected to pass.

The pipeline

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
                xmlns:t="http://xproc.org/ns/testsuite/3.0" xmlns:test="http://test" name="pipeline"
                version="3.0">
   <p:import href="../pipelines/import-022a.xpl"/>
   <p:import href="../pipelines/import-023b.xpl"/>
   <p:output port="result"/>
   <test:step-b/>
</p:declare-step>

Result

<is-visible xmlns:t="http://xproc.org/ns/testsuite/3.0"
            xmlns:test="http://test">false</is-visible>

Schematron checks

<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron"
          xmlns:t="http://xproc.org/ns/testsuite/3.0" queryBinding="xslt2">
   <s:pattern>
      <s:rule context="/">
         <s:assert test="is-visible">Root element should be 'is-visible'.</s:assert>
         <s:assert test="is-visible/text()='false'">Element 'is-visible' should have text 'false'.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

30 May 2022, Achim Berndzen
Initial test