epubcheck-002

Tests that the epubcheck can be called in the EXProc namespace.

Test epubcheck-002.xml is expected to pass.

The pipeline

<p:declare-step xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:err="http://www.w3.org/ns/xproc-error" xmlns:ex="http://exproc.org/ns/steps" 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"/>
   <ex:epubcheck name="epubcheck" assert-valid="false">
      <p:with-input href="../epubcheck/epub-001.epub"/>
   </ex:epubcheck>
   <p:sink/>
</p:declare-step>

Schematron validation

<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>

Revision history

16 Nov 2025, Norm Tovey-Walsh

Created test.