Testing p:pack
Test ab-pack-005.xml is expected to pass.
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
<p:output port="result"/>
<p:pack wrapper="Q{{http://test}}wrapper">
<p:with-input port="source">
<doc1/>
</p:with-input>
<p:with-input port="alternate">
<doc2/>
</p:with-input>
</p:pack>
<p:wrap-sequence wrapper="sequence-wrapper"/>
</p:declare-step>
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<s:ns uri="http://test" prefix="test"/>
<s:pattern>
<s:rule context="/">
<s:assert test="sequence-wrapper">The document root is not sequence-wrapper.</s:assert>
<s:assert test="sequence-wrapper/test:wrapper[1]/*[1][local-name()='doc1']">test:wrapper[1] is not correct.</s:assert>
<s:assert test="sequence-wrapper/test:wrapper[1]/*[2][local-name()='doc2']">test:wrapper[1] is not correct.</s:assert>
<s:assert test="count(sequence-wrapper/test:wrapper[1]/*)=2">wrapper[1] does not have exactly 0 child elements.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Added attribute 'queryBinding' to schematron's schema.
Ported test for p:pack from 1.0 test suite.