nw-import-002

This test verifies that multiple imports of the same common library do not count as duplicates. It’s derived from a real-world bug report from Achim.

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" version="3.0">
   <p:import href="../pipelines/nw-import-002-lib1.xpl"/>
   <p:import href="../pipelines/nw-import-002-lib2.xpl"/>
   <p:output port="result"/>
   <test:common-step/>
</p:declare-step>

Result

<common xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xmlns:test="http://test"/>

Schematron checks

<s:schema xmlns="http://www.w3.org/1999/xhtml"
          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="common">The pipeline root is not “common”.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

24 Dec 2024, Norm Tovey-Walsh
Initial commit.