Output port 51 (AB)
Tests that documents appear in the right order on p:output.
Test is expected to pass.
The pipeline
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:t="http://xproc.org/ns/testsuite/3.0" version="3.0">
<p:output port="result"/>
<p:try>
<p:identity>
<p:with-input>
<primary/>
</p:with-input>
</p:identity>
<p:catch code="error">
<p:identity>
<p:with-input>
<error/>
</p:with-input>
</p:identity>
</p:catch>
<p:finally>
<p:output port="additional" sequence="true"
primary="false">
<p:pipe step="producer"/>
<p:inline>
<doc1/>
</p:inline>
</p:output>
<p:identity name="producer">
<p:with-input>
<doc2/>
</p:with-input>
</p:identity>
</p:finally>
</p:try>
<p:wrap-sequence wrapper="result">
<p:with-input pipe="additional"/>
</p:wrap-sequence>
</p:declare-step>
Result
<result xmlns:t="http://xproc.org/ns/testsuite/3.0">
<doc2/>
<doc1/>
</result>
Schematron checks
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron"
xmlns:t="http://xproc.org/ns/testsuite/3.0" queryBinding="xslt2">
<s:pattern>
<s:rule context="/">
<s:assert test="result">The document root is not 'result'.</s:assert>
<s:assert test="result/*[1]/name()='doc2'">The first child element of result is not named doc2.</s:assert>
<s:assert test="result/*[2]/name()='doc1'">The second child element of result is not named doc1.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 10 Jun 2021, Achim Berndzen
- Added attribute 'queryBinding' to schematron's schema.
- 28 Sep 2020, Achim Berndzen
- Added new tests