letex:epubcheck epubcheck

epubcheck/xpl/epubcheck.xpl

Import URI: http://transpect.le-tex.de/epubcheck/xpl/epubcheck.xpl

letex:epubcheck

Description

An implementation of epubcheck to provide it's results as Schematron SVRL.

Usage

Provide the path to the EPUB file with the option epubfile-path.

Requirements

  • store-debug

    SVN: https://subversion.le-tex.de/common/pubcoach/trunk/xpl/simple-progress-msg.xpl

  • simple-progress-msg

    SVN: https://subversion.le-tex.de/common/xproc-util/store-debug/store-debug.xpl

Visualisation

The pre-creation of this SVG image needs the Graphviz software installed. Please inform your project maintainer.

Output Ports

NameDocumentationConnections

result

Output port: result

Provides the result of the epubcheck as Schematron SVRL file

Output port: result Provides the result of the epubcheck as Schematron SVRL file

Options

NameDocumentationDefault

epubfile-path

Option: epubfile-path

Expects the path to the EPUB file.

epubcheck-path

Option: epubcheck-path

If you want to use another epubcheck version as shipped within this repository, provide a valid path to a epubcheck JAR file.

'bin/epubcheck-3.0.1.jar'

svrl-srcpath

Option: svrl-srcpath

XPath location of the Schematron SVRL error message. This affects also where the error message is rendered in the HTML report.

'/'

debug

Option: debug

Used to switch debug mode on or off. Pass 'yes' to enable debug mode.

'yes'

debug-dir-uri

Option: debug-dir-uri

Expects a file URI of the directory that should be used to store debug information.

'debug'

Subpipeline

StepInputsOutputsOptions

p:variable status-dir-uri

Variable: status-dir-uri

This variable expects an URI. The file (see option above) is saved to this URI.

concat($debug-dir-uri, '/status')

letex:simple-progress-msg msg-epubcheck-start

source
msgs

 <c:messages>
   <c:message xml:lang="en">Starting EPUB check</c:message>
   <c:message xml:lang="de">Beginne EPUB-Prüfung</c:message>
 </c:messages>

result

file = 'epubcheck-start.txt'

status-dir-uri = $status-dir-uri

p:exec execute-epubcheck

source

p:empty

result

result-is-xml = 'false'

errors-is-xml = 'false'

wrap-error-lines = 'true'

wrap-result-lines = 'true'

command = 'java'

args = concat('-jar ', replace( $epubcheck-path, '^file:/+(([a-z]:)/)?', '$2/', 'i'), ' ', replace( $epubfile-path, '^file:/+(([a-z]:)/)?', '$2/', 'i') )

p:sink d542e176

source

result on execute-epubcheck

p:wrap-sequence d542e177

source

errors on execute-epubcheck

result

wrapper = 'document'

wrapper-prefix = 'cx'

wrapper-namespace = 'http://xmlcalabash.com/ns/extensions'

p:add-attribute d542e184

source

result on d542e177

result

match = '/cx:document'

attribute-name = 'epubcheck-path'

attribute-value = $epubcheck-path

p:add-attribute d542e188

source

result on d542e184

result

match = '/cx:document'

attribute-name = 'epubfile-path'

attribute-value = $epubfile-path

p:xslt convert-epubcheck-output

source

result on d542e188

stylesheet

p:document../xsl/epubcheck.xsl

result

letex:store-debug d542e201

source

result on convert-epubcheck-output

result

pipeline-step = 'epubcheck/epubcheck.svrl'

active = $debug

base-uri = $debug-dir-uri

letex:simple-progress-msg d542e207

source

result on d542e201

msgs

 <c:messages>
   <c:message xml:lang="en">EPUB check finished</c:message>
   <c:message xml:lang="de">EPUB-Prüfung beendet</c:message>
 </c:messages>

result

file = 'epubcheck-start.txt'

status-dir-uri = $status-dir-uri