<p:declare-stepxmlns:p="http://www.w3.org/ns/xproc"xmlns:px="http://www.daisy.org/ns/pipeline/xproc"xmlns:d="http://www.daisy.org/ns/pipeline/data"xmlns:c="http://www.w3.org/ns/xproc-step"xmlns:pef="http://www.daisy.org/ns/2008/pef"type="px:zedai-to-pef.script"version="1.0"exclude-inline-prefixes="#all"name="main">
<p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h1px:role="name">ZedAI to braille</h1><ppx:role="desc">Transforms a ZedAI (DAISY 4 XML) document into an embosser ready braille document.</p>
<apx:role="homepage"href="http://daisy.github.io/pipeline/Get-Help/User-Guide/Scripts/zedai-to-pef/">
Online documentation
</a>
<dlpx:role="author">
<dt>Name:</dt>
<ddpx:role="name">Bert Frees</dd>
<dt>Organization:</dt>
<ddpx:role="organization"href="http://www.sbs-online.ch/">SBS</dd>
<dt>E-mail:</dt>
<dd><apx:role="contact"href="mailto:bertfrees@gmail.com">bertfrees@gmail.com</a></dd>
</dl>
</p:documentation>
<p:inputport="source"primary="true"px:name="source"px:media-type="application/z3998-auth+xml">
<p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h2px:role="name">Input ZedAI</h2><ppx:role="desc">The ZedAI you want to convert to braille.</p>
</p:documentation>
</p:input><p:optionname="stylesheet"px:sequence="true"required="false"select="''"px:media-type="text/css application/xslt+xml"><p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h2px:role="name">Style sheets</h2><ppx:role="desc"xml:space="preserve">A list of CSS/Sass style sheets to apply.
DEPRECATION WARNING: XSLT style sheets are also supported, but this feature might be removed in the
future. It is recommended to apply any XSLT style sheets during pre-processing of the document.
Must be a space separated list of URIs, absolute or relative to the input.
Style sheets specified through this option are called "[user style
sheets](https://www.w3.org/TR/CSS2/cascade.html#cascade)". Style sheets can also be attached to the
source document. These are referred to as "[author style
sheets](https://www.w3.org/TR/CSS2/cascade.html#cascade)". They can be linked (using an
['xml-stylesheet' processing instruction](https://www.w3.org/TR/xml-stylesheet) or a ['link'
element](https://www.w3.org/Style/styling-XML#External)), embedded (using a ['style'
element](https://www.w3.org/Style/styling-XML#Embedded)) and/or inlined (using '[style'
attributes](https://www.w3.org/TR/css-style-attr/)).
Style sheets are applied to the document in the following way: XSLT style sheets are applied before
CSS/Sass style sheets. XSLT style sheets are applied one by one, first the user style sheets, then
the author style sheets, in the order in which they are specified.
All CSS/Sass style sheets are applied at once, but the order in which they are specified (first user
style sheets, then author style sheets) has an influence on the [cascading
order](https://www.w3.org/TR/CSS2/cascade.html#cascading-order).
CSS/Sass style sheets are interpreted according to [braille
CSS](http://braillespecs.github.io/braille-css) rules.
For info on how to use Sass (Syntactically Awesome StyleSheets) see the [Sass
manual](http://sass-lang.com/documentation/file.SASS_REFERENCE.html).</p>
</p:documentation>
<p:pipeinfo>
<px:type>
<choice>
<datatype="anyFileURI"datatypeLibrary="http://www.daisy.org/ns/pipeline/xproc">
<documentationxml:lang="en">File path relative to input ZedAI.</documentation>
</data>
<datatype="anyURI">
<documentationxml:lang="en">Any other absolute URI</documentation>
</data>
</choice>
</px:type>
</p:pipeinfo>
</p:option><p:optionname="transform"required="false"px:type="transform-query"select="'(translator:liblouis)(formatter:dotify)'"><p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h2px:role="name">Transformer features</h2><ppx:role="desc"xml:space="preserve">Features of the braille transformer.
Features of the [braille transformer](http://daisy.github.io/pipeline/Get-Help/User-Guide/Braille/)
to be used for creating the paginated braille document from the CSS styled input document. Together
with the "Braille code" option this determines the transformer that is selected.</p>
</p:documentation></p:option><p:optionname="output-dir"required="true"px:output="result"px:type="anyDirURI"px:media-type="text"><p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h2px:role="name">Output file</h2><ppx:role="desc">The output braille file.</p>
</p:documentation></p:option><p:optionname="output-file-format"required="false"px:type="transform-query"select="''"><p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h2px:role="name">Output file format</h2><ppx:role="desc"xml:space="preserve">The file format in which to store the braille result.
If left blank, the braille will be stored in PEF format.</p>
</p:documentation></p:option><p:optionname="include-preview"required="false"px:type="boolean"select="'false'"><p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h2px:role="name">Include preview</h2><ppx:role="desc"xml:space="preserve">Whether or not to include a HTML preview of the braille result.</p>
</p:documentation></p:option><p:optionname="preview-table"required="false"px:type="transform-query"select="''"><p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h2px:role="name">ASCII braille table for HTML preview</h2><ppx:role="desc"xml:space="preserve">The ASCII braille table used to render the HTML preview.
If left blank, the locale information in the input document will be used to select a suitable table.</p>
</p:documentation></p:option><p:optionname="preview-output-dir"required="false"px:output="result"px:type="anyDirURI"px:media-type="text/html"select="''"><p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h2px:role="name">Preview</h2><ppx:role="desc">An HTML preview of the braille result.</p>
</p:documentation></p:option><p:optionname="include-pef"required="false"px:type="boolean"select="'false'"><p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h2px:role="name">Include PEF</h2><ppx:role="desc"xml:space="preserve">Whether or not to keep the intermediary PEF file (for debugging).</p>
</p:documentation></p:option><p:optionname="pef-output-dir"required="false"px:output="result"px:type="anyDirURI"px:media-type="application/x-pef+xml"select="''"><p:documentationxmlns="http://www.w3.org/1999/xhtml">
<h2px:role="name">PEF</h2><ppx:role="desc">The intermediary PEF file.</p>
</p:documentation></p:option>
<p:importhref="zedai-to-pef.convert.xpl">
<p:documentation>
px:zedai-to-pef
</p:documentation>
</p:import>
<p:importhref="xml-to-pef.store.xpl">
<p:documentation>
px:xml-to-pef.store
</p:documentation>
</p:import>
<p:importhref="http://www.daisy.org/pipeline/modules/file-utils/library.xpl">
<p:documentation>
px:tempdir
</p:documentation>
</p:import>
<p:importhref="http://www.daisy.org/pipeline/modules/zedai-utils/library.xpl">
<p:documentation>
px:zedai-load
</p:documentation>
</p:import>
<px:tempdirname="temp-dir">
<p:with-optionname="href"select="if ($temp-dir!='') then $temp-dir else $pef-output-dir"/>
</px:tempdir>
<p:sink/>
<px:zedai-loadname="load">
<p:inputport="source">
<p:pipestep="main"port="source"/>
</p:input>
</px:zedai-load>
<px:zedai-to-pef>
<p:inputport="source.in-memory">
<p:pipestep="load"port="in-memory.out"/>
</p:input>
<p:with-optionname="stylesheet"select="$stylesheet"/>
<p:with-optionname="transform"select="$transform"/>
<p:with-optionname="temp-dir"select="string(/c:result)">
<p:pipestep="temp-dir"port="result"/>
</p:with-option>
</px:zedai-to-pef>
<px:xml-to-pef.store>
<p:inputport="obfl">
<p:empty/>
</p:input>
<p:with-optionname="name"select="replace(p:base-uri(/),'^.*/([^/]*)\.[^/\.]*$','$1')">
<p:pipestep="main"port="source"/>
</p:with-option>
<p:with-optionname="include-pef"select="$include-pef"/>
<p:with-optionname="include-preview"select="$include-preview"/>
<p:with-optionname="output-file-format"select="$output-file-format"/>
<p:with-optionname="preview-table"select="$preview-table"/>
<p:with-optionname="output-dir"select="$output-dir"/>
<p:with-optionname="pef-output-dir"select="$pef-output-dir"/>
<p:with-optionname="preview-output-dir"select="$preview-output-dir"/>
</px:xml-to-pef.store>
</p:declare-step>