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:p="http://www.w3.org/ns/xproc">
   |   <p:input port="source" content-types="application/zip application/epub+zip"/>
   |   <p:output port="result"
   |             content-types="application/zip application/epub+zip"
 5 |             primary="true"/>
   |   <p:output port="report" sequence="true" content-types="xml json"/>
   |   <p:option name="parameters" as="map(xs:QName,item()*)?"/>
   |   <p:option name="assert-valid" select="true()" as="xs:boolean"/>
   |   <p:option name="report-format" select="'xvrl'" as="xs:string"/>
10 |</p:declare-step>

Description

The cx:epubcheck validates the conformance of EPUB files and generates an XVRL report on the report port.

If assert-valid is true, any errors reported by EPUBCheck will cause the step to fail.

Regardless of whether or not any warnings or errors are reported, the original EPUB file is passed from the source port to the result port without change.

Configuration changes

The cx:epubcheck step adds a new default MIME type mapping for the extension “epub” to the MIME type “application/epub+zip”.

Additional dependencies

In addition to the standard dependencies, the cx:epubcheck step relies on these libraries:

epubcheck, version 5.0.1

The underlying EPUBCheck library.

Dependencies

This step is included in the XML Calabash application. If you are getting XML Calabash from Maven, you will also need to include the extension dependency:

  • com.xmlcalabash:epubcheck:3.0.0-alpha24

The following third-party dependencies will also be included transitively:

  • org.w3c:epubcheck:5.0.1