p:import-031 (AB)

Tests p:import: Testing re-entrant import of library with static option

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/ab-import-031-lib1.xpl"/>
   <p:import href="../pipelines/ab-import-031-lib2.xpl"/>
   <p:output port="result"/>
   <test:step1/>
</p:declare-step>

Result

<result xmlns:t="http://xproc.org/ns/testsuite/3.0">
   <step-1 xmlns:test="http://test" att="42"/>
   <step-2 xmlns:test="http://test" att="42"/>
   <step-3 xmlns:test="http://test" att="42"/>
</result>

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="result">The root element is not 'result'.</s:assert>
         <s:assert test="result/step-1">The root element does not have a child 'step-1'.</s:assert>
         <s:assert test="result/step-2">The root element does not have a child 'step-2'.</s:assert>
         <s:assert test="result/step-3">The root element does not have a child 'step-3'.</s:assert>
         <s:assert test="result/step-1/@att='42'">Element 'step-1' does not have att with value '42'.</s:assert>
         <s:assert test="result/step-2/@att='42'">Element 'step-2' does not have att with value '42'.</s:assert>
         <s:assert test="result/step-3/@att='42'">Element 'step-3' does not have att with value '42'.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

01 May 2025, Achim Berndzen
Initial test