p:archive 014 (AB)

Tests p:archive: Adding entries to a newly created archive. No source, but just manifest. command='update'

Test ab-p-archive-014.xml is expected to pass.

The pipeline


      <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
            <p:output port="result"/>        

            <p:archive parameters="map{'command' : 'update'}">
               <p:with-input port="source"><p:empty/></p:with-input>
               <p:with-input port="manifest">
                  <c:archive xmlns:c="http://www.w3.org/ns/xproc-step">
                     <c:entry xmlns:c="http://www.w3.org/ns/xproc-step" name="one.xml" href="../documents/ab-doc.xml"/>
                     <c:entry xmlns:c="http://www.w3.org/ns/xproc-step" name="two.xml" href="../documents/ab-doc2.xml"/>
                  </c:archive>
               </p:with-input>
               <p:with-input port="archive"><p:empty/></p:with-input>
            </p:archive>
 
            <p:unarchive/>
            <p:wrap-sequence wrapper="result"/>
      </p:declare-step>
   
MorganaXProc passing XML Calabash failing

Schematron validation


      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
         <s:pattern>
            <s:rule context="/">
               <s:assert test="result">Root element is not result.</s:assert>
               <s:assert test="count(result/doc)=2">Root element does not have two child 'doc'.</s:assert>
               <s:assert test="count(result/doc/@att)=1">There is no doc with @att..</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   

Revision history

01 Sep 2019, Achim Berndzen

Tests for p:archive