label-elements 011 (AB)

Testing p:label-elements.

Test ab-label-elements-011.xml is expected to pass.

The pipeline

<p:declare-step xmlns:p="" version="3.0">
   <p:output port="result">
   <p:input port="source">
            <p>Some para.</p>
            <p>Some other para.</p>
   <p:label-elements match="p" attribute="cnt" label="count(preceding::p)">
MorganaXProc passing XML Calabash passing

Schematron validation

<s:schema xmlns:s="" queryBinding="xslt2">
      <s:rule context="/">
         <s:assert test="doc/div/p[1]/@cnt='0'">Value of doc/div/p[1]/@cnt is not '0'</s:assert>
         <s:assert test="doc/div/p[2]/@cnt='1'">Value of doc/div/p[2]/@cnt is not '1'</s:assert>

Revision history

10 Jun 2021, Achim Berndzen

Added attribute 'queryBinding' to schematron's schema.

04 May 2019, Achim Berndzen

Ported test from 1.0 test suite.