Tests that tsv output works
Test tesseract-003.xml is expected to pass.
<p:declare-step xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:p="http://www.w3.org/ns/xproc" name="main" version="3.0">
<p:import href="https://xmlcalabash.com/ext/library/pdf-steps.xpl"/>
<p:import href="https://xmlcalabash.com/ext/library/tesseract.xpl"/>
<p:output port="result"/>
<cx:pdf-to-images dpi="300">
<p:with-input port="source" href="../documents/example.pdf"/>
</cx:pdf-to-images>
<cx:tesseract language="eng" output-format="tsv" debug-output="/dev/null"/>
<p:cast-content-type content-type="application/xml"/>
</p:declare-step>
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<s:ns prefix="fn" uri="http://www.w3.org/2005/xpath-functions"/>
<s:pattern>
<s:rule context="/">
<s:assert test="fn:array">Wrong document element</s:assert>
</s:rule>
</s:pattern>
<s:pattern>
<s:rule context="/fn:array">
<s:assert test="fn:array[1]/fn:string[1] = 'level'">Wrong output</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Created test.