<?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"
	ignore-whitespace-differences="true">

<t:title>Test wrap-009</t:title>

<t:input port="source">
<doc>
  <section>
    <title>some title</title>
    <section>
      <title>some title</title>
      <section>
        <title>some title</title>
      </section>
      <section>
        <title>some title</title>
      </section>
    </section>
  </section>
</doc>
</t:input>

<t:pipeline>
  <p:pipeline version='1.0'>
    <p:wrap match="section" wrapper="foo"/>
  </p:pipeline>
</t:pipeline>

<t:output port="result">
<doc>
  <foo><section>
    <title>some title</title>
    <foo><section>
      <title>some title</title>
      <foo><section>
        <title>some title</title>
      </section></foo>
      <foo><section>
        <title>some title</title>
      </section></foo>
    </section></foo>
  </section></foo>
</doc>
</t:output>
</t:test>

