<?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-006</t:title>

<t:input port="source">
<doc>
  <?foo bar?>
  <?foo bar?>
  <?foo baz?>
  <?foo bar?>
</doc>
</t:input>

<t:pipeline>
  <p:pipeline version='1.0'>
    <p:wrap match="processing-instruction('foo')"
            group-adjacent="." wrapper="test:wrapper"
            xmlns:test="http://www.example.com/test"/>
  </p:pipeline>
</t:pipeline>

<t:output port="result">
<doc>
  <test:wrapper xmlns:test="http://www.example.com/test"><?foo bar?>
  <?foo bar?></test:wrapper>
  <test:wrapper xmlns:test="http://www.example.com/test"><?foo baz?></test:wrapper>
  <test:wrapper xmlns:test="http://www.example.com/test"><?foo bar?></test:wrapper>
</doc>
</t:output>
</t:test>

