<?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 p:label-elements #002</t:title>

  <t:input port='source'>
    <doc>
      <div>
        <p>Some para.</p>
        <p>Some other para.</p>
      </div>
    </doc>
  </t:input>

  <t:pipeline>
    <p:pipeline version='1.0' name="pipeline">
      
      <p:label-elements label="concat(&quot;_foo_&quot;, $p:index, &quot;_bar_&quot;)"
                        attribute="test:pid"
                        match="p"
                        xmlns:test="http://test.com"/>

    </p:pipeline>
  </t:pipeline>

  <t:output port="result">
    <doc>
      <div>
        <p test:pid="_foo_1_bar_" xmlns:test="http://test.com">Some para.</p>
        <p test:pid="_foo_2_bar_" xmlns:test="http://test.com">Some other para.</p>
      </div>
    </doc>
  </t:output>

</t:test>

