Output port declaration 015 (AB)
Tests pipe on output port declaration
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"
xmlns:test="http://www.xml-project.com/test" version="3.0" name="main">
<p:output port="result"/>
<p:try>
<p:error code="test:error">
<p:with-input>
<some-code/>
</p:with-input>
</p:error>
<p:catch name="catcher">
<p:group>
<p:output port="result">
<p:pipe port="error" step="catcher"/>
</p:output>
<p:identity>
<p:with-input>
<not-correct/>
</p:with-input>
</p:identity>
</p:group>
</p:catch>
</p:try>
</p:declare-step>
Schematron checks
<s:schema xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:t="http://xproc.org/ns/testsuite/3.0"
queryBinding="xslt2">
<s:ns prefix="c"
uri="http://www.w3.org/ns/xproc-step"/>
<s:pattern>
<s:rule context="/">
<s:assert test="c:errors">The pipeline root is not "c:errors".</s:assert>
<s:assert test="count(c:errors/c:error)">There is not exactly one c:error child.</s:assert>
<s:assert test="c:errors/c:error/@code='test:error'">The code attribute of c:error is not right.</s:assert>
<s:assert test="c:errors/c:error/some-code">Element c:error does not have a child some-code.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 10 Jun 2021, Achim Berndzen
- Added attribute 'queryBinding' to schematron's schema.
- 09 May 2020, Achim Berndzen
- New tests