<?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 labelelements #011</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 match="p" attribute="cnt" label='count(preceding::p)'/>

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

<t:output port='result'>
<doc>
  <div>
    <p cnt="0">Some para.</p>
    <p cnt="1">Some other para.</p>
  </div>
</doc>
</t:output>

</t:test>


