<?xml version="1.0" encoding="utf-8"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xml:base="/ab-choose-008.xml"
        name="ab-choose-008.xml"
        expected="fail"
        code="err:XD0001">
   <t:info xmlns:err="http://www.w3.org/ns/xproc-error">
      <t:title>p:choose-008 (AB)</t:title>
      <t:revision-history>
         <t:revision>
            <t:date>2019-04-22</t:date>
            <t:author>
               <t:name>Achim Berndzen</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Adapted test to new context item strategy, new error code.</p>
            </t:description>
         </t:revision>
         <t:revision>
            <t:date>2019-04-05</t:date>
            <t:author>
               <t:name>Achim Berndzen</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>New tests</p>
            </t:description>
         </t:revision>
      </t:revision-history>
   </t:info>
   <t:description xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:err="http://www.w3.org/ns/xproc-error">
      <p>Tests XD0001 is raised if more than one document appears on the connection for this input port.</p>
   </t:description>
   <t:pipeline xmlns:err="http://www.w3.org/ns/xproc-error">
      <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
         <p:output port="result"/>
         <p:choose>
            <p:with-input>
               <doc/>
               <doc/>
            </p:with-input>
            <p:when test="/doc">
               <p:identity>
                  <p:with-input>
                     <doc1/>
                  </p:with-input>
               </p:identity>
            </p:when>
            <p:otherwise>
               <p:identity>
                  <p:with-input>
                     <doc2/>
                  </p:with-input>
               </p:identity>
            </p:otherwise>
         </p:choose>
      </p:declare-step>
   </t:pipeline>
</t:test>
