override-content-types-025 (AB)

Tests @override-content-types is correctly implemented.

Test is expected to pass.

The pipeline

<p:declare-step xmlns:c="http://www.w3.org/ns/xproc-step"
                xmlns:p="http://www.w3.org/ns/xproc"
                xmlns:t="http://xproc.org/ns/testsuite/3.0" version="3.0">
   <p:output port="result"/>
   <p:archive-manifest override-content-types="[['\.xml$', 'application/test+xml'],                 ['^ab-doc\.xml$' , 'application/tester+xml']]">
      <p:with-input href="../documents/ab-doc.zip"/>
   </p:archive-manifest>
   <p:identity>
      <p:with-input>
         <result>{string(/c:archive/c:entry[@name='ab-doc.xml']/@content-type)}</result>
      </p:with-input>
   </p:identity>
</p:declare-step>

Result

<result xmlns:c="http://www.w3.org/ns/xproc-step"
        xmlns:t="http://xproc.org/ns/testsuite/3.0">application/test+xml</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:ns prefix="c"
         uri="http://www.w3.org/ns/xproc-step"/>
   <s:pattern>
      <s:rule context="/">
         <s:assert test="result">The root element is not 'result'.</s:assert>
         <s:assert test="result/text()='application/test+xml'">Text content of 'result' is not 'application/test+xml'.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

10 Jun 2021, Achim Berndzen
Added attribute 'queryBinding' to schematron's schema.
09 Apr 2020, Achim Berndzen
Initial tests for override-content-types