<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="fail" xmlns:err="http://www.w3.org/ns/xproc-error" code="err:XS0036"
        xmlns:t="http://xproc.org/ns/testsuite/3.0">
   <t:info>
      <t:title>Declare-step-012 (AB)</t:title>
      <t:revision-history>
         <t:revision>
            <t:date>2021-12-05</t:date>
            <t:author>
               <t:name>Achim Berndzen</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Fixed test: It is expected to fail with XS0036.</p>
            </t:description>
         </t:revision>
         <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-02-27</t:date>
            <t:author>
               <t:name>Achim Berndzen</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Added new tests for p:declare-step and p:import.</p>
            </t:description>
         </t:revision>
      </t:revision-history>
   </t:info>
   <t:description xmlns="http://www.w3.org/1999/xhtml">
      <p>Tests that names of declared steps are correctly scoped.</p>
   </t:description>
   <t:pipeline>
      <p:declare-step version="3.0"
                      xmlns:p="http://www.w3.org/ns/xproc"
                      xmlns:test="http://test">
         <p:output port="result"/>
         <p:declare-step type="test:step-1">
            <p:output port="result"/>
            <p:declare-step type="test:step-2">
               <p:output port="result"/>
               <p:identity>
                  <p:with-input>
                     <doc/>
                  </p:with-input>
               </p:identity>
            </p:declare-step>
            <test:step-2/>
         </p:declare-step>
         <p:declare-step type="test:step-2">
            <p:output port="result"/>
            <p:identity>
               <p:with-input>
                  <doc1/>
               </p:with-input>
            </p:identity>
         </p:declare-step>
         <test:step-1 name="one"/>
         <test:step-2 name="two"/>
         <p:wrap-sequence wrapper="result">
            <p:with-input pipe="@one @two"/>
         </p:wrap-sequence>
      </p:declare-step>
   </t:pipeline>
</t:test>