Name

cx:epubcheck — Checks the conformance of EPUB files.

Synopsis

This step uses the W3C EPUBCheck validator to check the conformance of EPUB files.

Input portPrimarySequenceContent types
source✔  application/zip application/epub+zip 
Output portPrimarySequenceContent types
result✔  application/zip application/epub+zip 
report ✔ xml json 
Option nameTypeDefault value
assert-validxs:booleantrue()
parametersmap(xs:QName,item()*)?()
report-formatxs:string'xvrl'
This is an extension step; to use it, your pipeline must include its declaration. For example, by including the extension library with an import at the top of your pipeline:
<p:import href="https://xmlcalabash.com/ext/library/epubcheck.xpl"/>
Declaration
 1 |<p:declare-step xmlns:cx="http://xmlcalabash.com/ns/extensions"
   |                xmlns:p="http://www.w3.org/ns/xproc"
   |                type="cx:epubcheck">
   |   <p:input port="source" content-types="application/zip application/epub+zip"/>
 5 |   <p:output port="result"
   |             content-types="application/zip application/epub+zip"
   |             primary="true"/>
   |   <p:output port="report" sequence="true" content-types="xml json"/>
   |   <p:option name="parameters" as="map(xs:QName,item()*)?"/>
10 |   <p:option name="assert-valid" select="true()" as="xs:boolean"/>
   |   <p:option name="report-format" select="'xvrl'" as="xs:string"/>
   |</p:declare-step>
Errors
CodeDescription
err:XD0030It is a dynamic error (err:XD0030) if the assert-valid option on ex:epubcheck is true and the EPUB document is not valid.

Description

The cx:epubcheck is the same as the ex:epubcheck step with the exception of the error code raised when assert-valid is true and the EPUB is invalid.