Tests that the epubcheck step writes a report.
Test epubcheck-001.xml is expected to pass.
<p:declare-step xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:err="http://www.w3.org/ns/xproc-error" xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
<p:import href="https://xmlcalabash.com/ext/library/epubcheck.xpl"/>
<p:output port="result" pipe="report@epubcheck"/>
<cx:epubcheck name="epubcheck" assert-valid="false">
<p:with-input href="../epubcheck/epub-001.epub"/>
</cx:epubcheck>
<p:sink/>
</p:declare-step>
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<s:ns prefix="xvrl" uri="http://www.xproc.org/ns/xvrl"/>
<s:pattern>
<s:rule context="/">
<s:assert test="xvrl:report">The document root is not correct.</s:assert>
</s:rule>
</s:pattern>
<s:pattern>
<s:rule context="/xvrl:report">
<s:assert test="xvrl:detection[@code='PKG-005']">Error PKG-005 not reported.</s:assert>
<s:assert test="xvrl:detection[@code='RSC-026']">Error RSC-026 not reported.</s:assert>
<s:assert test="xvrl:digest/@error-count = 3">Wrong number of errors reported.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Created test.