label-elements 004 (AB)

Testing p:label-elements.

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

The pipeline


<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
   <p:output port="result"/>
   <p:input port="source">
      <doc>
         <div>
            <p>Some para.</p>
            <p>Some other para.</p>
         </div>
      </doc>
   </p:input>
   <p:label-elements replace="true"/>
   <p:for-each>
      <p:output port="result"/>
      <p:with-input select="//*[@xml:id]"/>
      <p:identity/>
   </p:for-each>
   <p:count/>
</p:declare-step>
MorganaXProc passing XML Calabash passing

Schematron validation


<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
   <s:ns uri="http://www.w3.org/ns/xproc-step" prefix="c"/>
   <s:pattern>
      <s:rule context="/">
         <s:assert test="c:result">The document root is not c:result.</s:assert>
         <s:assert test="c:result/text()='4'">Value of c:result is not '4'.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

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