Name

ex:epubcheck — Checks the conformance of EPUB files.

Synopsis

Introduction

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

To use the ex:epubcheck step, declare the ex: prefix for http://exproc.org/ns/steps> and add the following import to your pipeline:

  |<p:import href="https://exproc.org/library/epubcheck.xpl"/>

Step declaration

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'
Declaration
 1 |<p:declare-step xmlns:ex="http://exproc.org/ns/steps"
   |                xmlns:p="http://www.w3.org/ns/xproc"
   |                version="3.1"
   |                type="ex:epubcheck">
 5 |   <p:input port="source" content-types="application/zip application/epub+zip"/>
   |   <p:output port="result"
   |             content-types="application/zip application/epub+zip"
   |             primary="true"/>
   |   <p:output port="report" sequence="true" content-types="xml json"/>
10 |   <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"/>
   |</p:declare-step>

Errors

It is a dynamic error if the assert-valid option on ex:epubcheck is true and the EPUB document is not valid.

Description

The ex: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.