<?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 viewport #002</t:title>
  
  <t:description xmlns="http://www.w3.org/1999/xhtml">
    <p>Test <code>p:viewport</code> and <code>p:viewport-source</code></p>
  </t:description>

  <t:pipeline>
    <p:declare-step version='1.0'>
      <p:output port="result"/>

      <p:viewport match="para">
        <p:viewport-source>
          <p:inline>
            <doc>
              <para>Some paragraph.</para>
              <para>Some paragraph.</para>
              <para>Some paragraph.</para>
              <para>
                <para>Nested paragraph.</para>
              </para>
            </doc>
          </p:inline>
        </p:viewport-source>
        <p:identity>
          <p:input port="source">
            <p:inline><foo/></p:inline>
          </p:input>
        </p:identity>
      </p:viewport>

    </p:declare-step>
  </t:pipeline>
  
  <t:output port="result">
    <doc>
      <foo/>
      <foo/>
      <foo/>
      <foo/>
    </doc>
  </t:output>
</t:test>
