pack 004 (AB)

Testing p:pack

Test ab-pack-004.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="wrapper">
      <p:with-input port="source">
         <p:empty/>
      </p:with-input>
      <p:with-input port="alternate">
         <p:empty/>
      </p:with-input>
   </p:pack>
   <p:wrap-sequence wrapper="sequence-wrapper"/>
</p:declare-step>
MorganaXProc passing XML Calabash passing

Schematron validation


<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
   <s:pattern>
      <s:rule context="/">
         <s:assert test="sequence-wrapper">The document root is not sequence-wrapper.</s:assert>
         <s:assert test="count(sequence-wrapper/wrapper[1]/*)=0">wrapper[1] does not have exactly 0 child elements.</s:assert>
         <s:assert test="count(sequence-wrapper/wrapper[2]/*)=0">wrapper[2] does not have exactly 0 child elements.</s:assert>
         <s:assert test="count(sequence-wrapper/wrapper[3]/*)=0">wrapper[3] does not have exactly 0 child elements.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

10 Jun 2021, Achim Berndzen

Added attribute 'queryBinding' to schematron's schema.

06 May 2019, Achim Berndzen

Ported test for p:pack from 1.0 test suite.