p:archive 019 (AB)

Tests p:archive: Adding entries to a newly created archive. No manifest. @name = path, default method='none'.

Test ab-p-archive-019.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{'method': 'none'}">
               <p:with-input port="source">
                  <p:inline document-properties="map{'base-uri' : 'http://test/folder/one.xml'}">
                     <one xmlns=""/>
                  </p:inline>
                  <p:inline document-properties="map{'base-uri' : 'http://test/folder/two.xml'}">
                     <two xmlns=""/>
                  </p:inline>
               </p:with-input>
               <p:with-input port="manifest"><p:empty/></p:with-input>
               <p:with-input port="archive"><p:empty/></p:with-input>
            </p:archive>
 
            <p:archive-manifest/>
      </p:declare-step>
   
MorganaXProc passing XML Calabash failing

Schematron validation


      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
         <s:ns uri="http://www.w3.org/ns/xproc-step" prefix="c"/>
         <s:pattern>
            <s:rule context="/">
               <s:assert test="c:archive">Root element is not c:archive.</s:assert>
               <s:assert test="count(c:archive/c:entry)=2">Root element does not have two child 'c:entry'.</s:assert>
               <s:assert test="c:archive/c:entry/@name='folder/one.xml'">There is no c:entry for 'folder/one.xml'.</s:assert>
               <s:assert test="c:archive/c:entry/@name='folder/two.xml'">There is no c:entry for 'folder/two.xml'.</s:assert>
               <s:assert test="c:archive/c:entry[@name='folder/one.xml']/@method='none'">Method for c:entry[one.xml] is not 'none'.</s:assert>
               <s:assert test="c:archive/c:entry[@name='folder/two.xml']/@method='none'">Method for c:entry[two.xml] is not 'none'.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   

Revision history

01 Sep 2019, Achim Berndzen

Tests for p:archive