pack 007 (AB)

Testing correct handling of non element noded by p:pack.

Test ab-pack-007.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:pack wrapper="wrap">
            <p:with-input port="source">
               <p:inline>
                  
                  <doc1 xmlns=""/>
                  
               </p:inline>
            </p:with-input>
            <p:with-input port="alternate">
               <p:inline>
                  
                  <doc2 xmlns=""/>
                  
               </p:inline>
            </p:with-input>
         </p:pack>
         
         <p:wrap-sequence wrapper="doc"/>
      </p:declare-step>
   
MorganaXProc passing

Schematron validation


      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
          <s:pattern>
            <s:rule context="/">
               <s:assert test="doc">The document root is not doc.</s:assert>
               <s:assert test="doc/wrap/child::node()[1] instance of comment()">First child of wrap should be a comment.</s:assert>
               <s:assert test="doc/wrap/child::node()[2] instance of element()">Second child of wrap should be an element.</s:assert>
               <s:assert test="doc/wrap/child::node()[3] instance of processing-instruction()">Third child of wrap should be a pi.</s:assert>
               <s:assert test="doc/wrap/child::node()[4] instance of processing-instruction()">Fourth child of wrap should be an pi.</s:assert>
               <s:assert test="doc/wrap/child::node()[5] instance of element()">Fifth child of wrap should be an element.</s:assert>
               <s:assert test="doc/wrap/child::node()[6] instance of comment()">Sixth child of wrap should be a comment.</s:assert>
               
               <s:assert test="count(doc/wrap/child::node())=6">Element 'wrap' should have 6 children.</s:assert>              
            </s:rule>
         </s:pattern>
      </s:schema>
   

Revision history

06 May 2019, Achim Berndzen

Additional test for p:pack.