p:text-count 003 (NW)

Tests end-of-line handling in p:text-count.

Test nw-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">one
two

</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()=3">Content of result does not equal 3.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

10 Jun 2021, Achim Berndzen

Added attribute 'queryBinding' to schematron's schema.

21 Dec 2019, Norman Walsh

Initial commit.