p:unarchive 015 (AB)

Tests p:unarchive: Check content of unarchived document.

Test ab-unarchive-015.xml is expected to pass.

The pipeline


      <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" name="pipeline" version="3.0">
         <p:output port="result"/>
         
         <p:unarchive include-filter="folder/json\.json">
            <p:with-input href="../documents/archive.zip"/>
         </p:unarchive>
         <p:cast-content-type content-type="application/xml"/>
      </p:declare-step>
   
MorganaXProc passing XML Calabash failing

Schematron validation


      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
         <s:ns prefix="json" uri="http://www.w3.org/2005/xpath-functions"/>
         <s:pattern>
            <s:rule context="/">
               <s:assert test="json:map">Root element is not 'json:map'.</s:assert>
               <s:assert test="count(json:map/*)=1">Root element does not have exactly one child.</s:assert>
               <s:assert test="json:map/json:string[@key='key']/text()='value'">Root element does not an entry for 'key' with value 'value'.</s:assert>
           </s:rule>
         </s:pattern>
      </s:schema>
   

Revision history

25 Aug 2019, Achim Berndzen

Initial tests for p:unarchive