<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="pass"
        xmlns:t="http://xproc.org/ns/testsuite/3.0">
   <t:info>
      <t:title>Choose 004</t:title>
      <t:revision-history>
         <t:revision>
            <t:date>2021-06-10</t:date>
            <t:author>
               <t:name>Achim Berndzen</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Added attribute 'queryBinding' to schematron's schema.</p>
            </t:description>
         </t:revision>
         <t:revision>
            <t:date>2019-04-03</t:date>
            <t:author>
               <t:name>Achim Berndzen</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Changed test because a missing p:otherwise is now an implicit identity.</p>
            </t:description>
         </t:revision>
         <t:revision>
            <t:date>2018-12-02</t:date>
            <t:author>
               <t:name>Achim Berndzen</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Changed test, because it not an error anymore, if no p:when is selected and no p:otherwise is present.</p>
            </t:description>
         </t:revision>
         <t:revision>
            <t:date>2017-10-09T21:11:50-07:00</t:date>
            <t:author>
               <t:name>Norman Walsh</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Fixed namespace</p>
            </t:description>
         </t:revision>
         <t:revision>
            <t:date>2017-10-09T21:10:21-07:00</t:date>
            <t:author>
               <t:name>Norman Walsh</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Fixed namespace</p>
            </t:description>
         </t:revision>
         <t:revision>
            <t:date>2017-09-24T17:47:42+01:00</t:date>
            <t:author>
               <t:name>Norman Walsh</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Port my test suite; add documentation and schemas</p>
            </t:description>
         </t:revision>
      </t:revision-history>
   </t:info>
   <t:pipeline src="../pipelines/choose-004.xpl"/>
   <t:option name="match"
             select="'3'"/>
   <t:schematron>
      <s:schema queryBinding="xslt2"
                xmlns:s="http://purl.oclc.org/dsdl/schematron">
         <s:ns prefix="c"
               uri="http://www.w3.org/ns/xproc-step"/>
         <s:pattern>
            <s:rule context="/*">
               <s:assert test="self::result">The pipeline root is not result.</s:assert>
               <s:assert test="count(self::result/*)=1">The result document should not have one child.</s:assert>
               <s:assert test="self::result/doc">The child's name should be doc.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   </t:schematron>
</t:test>