Name
ex:epubcheck — Checks the conformance of EPUB files.
Synopsis
This step uses the W3C EPUBCheck validator to check the conformance of EPUB files.
| Input port | Primary | Sequence | Content types |
|---|---|---|---|
| source | ✔ | application/zip application/epub+zip |
| Output port | Primary | Sequence | Content types |
|---|---|---|---|
| result | ✔ | application/zip application/epub+zip | |
| report | ✔ | xml json |
| Option name | Type | Default value |
|---|---|---|
| assert-valid | xs:boolean | true() |
| parameters | map(xs:QName,item()*)? | () |
| report-format | xs:string | 'xvrl' |
<p:import href="https://exproc.org/library/epubcheck.xpl"/>Declaration
1 |<p:declare-step xmlns:ex="http://exproc.org/ns/steps"
| xmlns:p="http://www.w3.org/ns/xproc"
| type="ex: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
| Code | Description |
|---|---|
exerr:XC0001 | It is a dynamic error (exerr:XC0001)
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.
Configuration changes
The ex: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
ex:epubcheck step relies on these libraries:
- epubcheck, version 5.3.0
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 these additional dependencies:
javax.activation:activation:1.1.1org.w3c:epubcheck:5.3.0