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>

Result

<c:errors xmlns:c="http://www.w3.org/ns/xproc-step"
          xmlns:cx="http://xmlcalabash.com/ns/extensions" 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">
   <c:error name="!error" type="p:error" code="test:error"
            href="file:/woodpecker/src/codeberg.org/xmlcalabash/xmlcalabash3/tests/3.0-test-suite/test-suite/tests/ab-output-declaration-015.xml" line="37" column="68">
      <cx:input-location href="file:/woodpecker/src/codeberg.org/xmlcalabash/xmlcalabash3/tests/3.0-test-suite/test-suite/tests/ab-output-declaration-015.xml"/>
      <cx:message>(no message for error)</cx:message>
      <cx:explanation>[No explanation for test:error]</cx:explanation>
      <some-code/>
      <cx:stack-trace>
         <cx:stack-frame type="p:error" name="!error"/>
         <cx:stack-frame type="p:group" name="!group"/>
      </cx:stack-trace>
   </c:error>
</c:errors>

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