p:text-count 003 (AB)

Tests p:text-count

Test ab-text-count-003.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:text-count>
      <p:with-input>
         <p:inline content-type="text/plain">First line
second line</p:inline>
      </p:with-input>
   </p:text-count>
</p:declare-step>
MorganaXProc passing XML Calabash passing

Schematron validation


<s:schema xmlns="http://www.w3.org/1999/xhtml" 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">Root element is not 'c:result'.</s:assert>
         <s:assert test="c:result/text()=2">Content of result does not equal 0.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

10 Jun 2021, Achim Berndzen

Added attribute 'queryBinding' to schematron's schema.

30 May 2019, Achim Berndzen

Tests for p:text-count