<?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 group #003</t:title>

  <t:input port='source'>
    <document>
      <title>Some Title</title>
      <para>Some paragraph.</para>
    </document>
  </t:input>

  <t:pipeline>
    <p:declare-step version='1.0' name="pipeline">
      <p:input port="source"/>
      <p:output port="result">
        <p:pipe step="group" port="result"/>
      </p:output>
      <p:output port="result2">
        <p:pipe step="group" port="result2"/>
      </p:output>

      <p:group name="group">
	<p:output port="result">
          <p:pipe step="outer-identity" port="result"/>
        </p:output>
	<p:output port="result2" primary="true"/>
        <p:identity/>
      </p:group>

      <p:identity name="outer-identity">
        <p:input port="source">
          <p:inline>
            <foo/>
          </p:inline>
        </p:input>
      </p:identity>
    </p:declare-step>
  </t:pipeline>

  <t:output port="result">
    <foo/>
  </t:output>

  <t:output port="result2">
    <document>
      <title>Some Title</title>
      <para>Some paragraph.</para>
    </document>
  </t:output>

</t:test>


