<?xml-stylesheet type="text/xsl" href="/style/testcase.xsl"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite"
        xmlns:p="http://www.w3.org/ns/xproc"
        xmlns:c="http://www.w3.org/ns/xproc-step"
        xmlns:err="http://www.w3.org/ns/xproc-error">
  <t:title>Test for-each #009</t:title>
  
  <t:description xmlns="http://www.w3.org/1999/xhtml">
    <p>Test <code>p:for-each</code> with nested <code>p:output</code>
    that contains default bindings.</p>
  </t:description>

  <t:pipeline>
    <p:declare-step version='1.0'>
      <p:output port="result"/>
      
      <p:for-each name="loop">
        <p:iteration-source>
          <p:inline><foo/></p:inline>
          <p:inline><foo/></p:inline>
        </p:iteration-source>
        <p:output port="out">
          <p:inline><bar/></p:inline>
        </p:output>
        <p:sink/>
      </p:for-each>

      <p:wrap-sequence wrapper="wrapper"/>

    </p:declare-step>
  </t:pipeline>

  <t:output port="result">
    <wrapper><bar/><bar/></wrapper>
  </t:output>
</t:test>
