p:archive-manifest 014 (AB)

Tests c:entry/@href is an absolute URI resolved by base URI.

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" name="pipeline" version="3.0">
   <p:output port="result"/>
   <p:archive>
      <p:with-input>
         <p:inline>
            <doc/>
         </p:inline>
      </p:with-input>
   </p:archive>
   <p:set-properties properties="map{'base-uri' : 'http://xproc.org/ns/testsuite/'}"/>
   <p:archive-manifest/>
</p:declare-step>

Result

<c:archive xmlns:c="http://www.w3.org/ns/xproc-step"
           xmlns:t="http://xproc.org/ns/testsuite/3.0" format="zip">
   <c:entry xmlns:cx="http://xmlcalabash.com/ns/extensions"
            name="woodpecker/src/codeberg.org/xmlcalabash/xmlcalabash3/tests/3.0-test-suite/test-suite/tests/ab-archive-manifest-014.xml" content-type="application/xml" cx:size="79"
            cx:last-modified="2025-06-19T18:05:04Z" method="deflated"
            href="http://xproc.org/ns/testsuite/woodpecker/src/codeberg.org/xmlcalabash/xmlcalabash3/tests/3.0-test-suite/test-suite/tests/ab-archive-manifest-014.xml"/>
</c:archive>

Schematron checks

<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron"
          xmlns:t="http://xproc.org/ns/testsuite/3.0" queryBinding="xslt2">
   <s:ns prefix="c"
         uri="http://www.w3.org/ns/xproc-step"/>
   <s:pattern>
      <s:rule context="/">
         <s:assert test="starts-with(c:archive/c:entry/@href, 'http://xproc.org/ns/testsuite/')">href does not contain the correct URI.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

20 Sep 2021, Norman Walsh
Corrected base URI so that resolution occurs as expected.
10 Jun 2021, Achim Berndzen
Added attribute 'queryBinding' to schematron's schema.
21 Dec 2019, Achim Berndzen
Additional tests for p:unarchive and p:archive-manifest