<p:declare-stepxmlns:p="http://www.w3.org/ns/xproc"xmlns:px="http://www.daisy.org/ns/pipeline/xproc"xmlns:pxi="http://www.daisy.org/ns/pipeline/xproc/internal"xmlns:d="http://www.daisy.org/ns/pipeline/data"version="1.0"type="px:dtbook-validator.script"px:input-filesets="dtbook"exclude-inline-prefixes="#all">
<p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h1px:role="name">DTBook Validator</h1><ppx:role="desc">Validates DTBook documents. Supports inclusion of MathML.</p>
<apx:role="homepage"href="http://daisy.github.io/pipeline/Get-Help/User-Guide/Scripts/dtbook-validator/">
Online documentation
</a>
<address>
Authors:
<dlpx:role="author">
<dt>Name:</dt>
<ddpx:role="name">Marisa DeMeglio</dd>
<dt>E-mail:</dt>
<dd><ahref="mailto:marisa.demeglio@gmail.com">marisa.demeglio@gmail.com</a></dd>
<dt>Organization:</dt>
<ddpx:role="organization">DAISY Consortium</dd>
</dl>
</address>
</p:documentation>
<p:outputport="report"sequence="true">
<p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h1px:role="name">Raw validation report</h1><ppx:role="desc"xml:space="preserve">Raw XML-formatted report which is a concatenation of the reports from all types of validation used (RelaxNG, Schematron and custom).
[More details on the file format](http://daisy.github.io/pipeline/ValidationReportXML).</p>
</p:documentation>
<p:pipestep="validate-dtbook"port="xml-report"/>
</p:output><p:outputport="html-report"px:media-type="application/vnd.pipeline.report+xml">
<p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h1px:role="name">Validation report</h1>
</p:documentation>
<p:pipestep="validate-dtbook"port="html-report"/>
</p:output><p:outputport="validation-status"px:media-type="application/vnd.pipeline.status+xml">
<p:pipestep="validate-dtbook"port="validation-status"/>
</p:output><p:optionname="source"required="true"px:type="anyFileURI"px:media-type="application/x-dtbook+xml">
<p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h2px:role="name">DTBook</h2><ppx:role="desc">The input DTBook document.</p>
</p:documentation>
</p:option><p:optionname="result"required="false"px:output="result"px:type="anyDirURI"select="''"px:media-type="text">
<p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h2px:role="name">Validation report in XML and HTML</h2><ppx:role="desc"xml:space="preserve">Validation report in two formats: the raw XML-formatted report, which is a concatenation of the reports from all types of validation used (RelaxNG, Schematron and custom), and the HTML-formatted version.
[More details on the XML format](http://daisy.github.io/pipeline/ValidationReportXML).</p>
</p:documentation>
</p:option><p:optionname="mathml-version"select="'3.0'"required="false"><p:pipeinfo><px:type>
<choice>
<value>3.0</value>
<value>2.0</value>
</choice>
</px:type></p:pipeinfo><p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h2px:role="name">MathML version</h2><ppx:role="desc">Version of MathML in the DTBook file(s).</p>
</p:documentation>
</p:option><p:optionname="check-images"required="false"px:type="boolean"select="'false'">
<p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h2px:role="name">Check that images exist</h2><ppx:role="desc">Check to see that referenced images exist on disk.</p>
</p:documentation>
</p:option><p:optionname="nimas"select="'false'"required="false"px:type="boolean">
<p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h2px:role="name">Validate against NIMAS 1.1</h2><ppx:role="desc">Validate using NIMAS 1.1 rules for DTBook.</p>
</p:documentation>
</p:option>
<p:importhref="http://www.daisy.org/pipeline/modules/fileset-utils/library.xpl">
<p:documentation>
px:fileset-add-entry
</p:documentation>
</p:import>
<p:importhref="http://www.daisy.org/pipeline/modules/dtbook-utils/library.xpl">
<p:documentation>
px:dtbook-validate
</p:documentation>
</p:import>
<p:importhref="dtbook-validator.store.xpl">
<p:documentation>
pxi:dtbook-validator.store
</p:documentation>
</p:import>
<px:fileset-add-entrymedia-type="application/x-dtbook+xml"px:message="DTBook validator: {$source}">
<p:with-optionname="href"select="$source"/>
<p:inputport="source.fileset">
<p:inline>
<d:fileset/>
</p:inline>
</p:input>
</px:fileset-add-entry>
<px:dtbook-validatename="validate-dtbook">
<p:with-optionname="mathml-version"select="$mathml-version"/>
<p:with-optionname="check-images"select="$check-images='true'"/>
<p:with-optionname="nimas"select="$nimas='true'"/>
</px:dtbook-validate>
<pxi:dtbook-validator.store>
<p:inputport="xml-report">
<p:pipestep="validate-dtbook"port="xml-report"/>
</p:input>
<p:inputport="html-report">
<p:pipestep="validate-dtbook"port="html-report"/>
</p:input>
<p:with-optionname="output-dir"select="$result"/>
</pxi:dtbook-validator.store>
</p:declare-step>