<p:declare-step xmlns: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:documentation xmlns="http://www.w3.org/1999/xhtml"> <h1 px:role="name">ZedAI to braille</h1> <p px:role="desc">Transforms a ZedAI (DAISY 4 XML) document into an embosser ready braille document.</p> <a px:role="homepage" href="http://daisy.github.io/pipeline/Get-Help/User-Guide/Scripts/zedai-to-pef/"> Online documentation </a> <address> Authors: <dl px:role="author"> <dt>Name:</dt> <dd px:role="name">Bert Frees</dd> <dt>E-mail:</dt> <dd><a px:role="contact" href="mailto:bertfrees@gmail.com">bertfrees@gmail.com</a></dd> <dt>Organization:</dt> <dd px:role="organization" href="http://www.sbs-online.ch/">SBS</dd> </dl> </address> </p:documentation> <p:input port="source" primary="true" px:media-type="application/z3998-auth+xml"> <p:documentation xmlns="http://www.w3.org/1999/xhtml"> <h2 px:role="name">Input ZedAI</h2> <p px:role="desc">The ZedAI you want to convert to braille.</p> </p:documentation> </p:input> <p:option name="stylesheet" required="false" px:type="anyURI" select="''" px:sequence="true" px:separator=" " px:media-type="text/css text/x-scss application/xslt+xml"><p:documentation xmlns="http://www.w3.org/1999/xhtml"> <h2 px:role="name">Style sheets</h2> <p px:role="desc" xml:space="preserve">A list of CSS/Sass style sheets to take into account. 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/)). Only author styles that apply to "embossed" media are taken into account. All style sheets are applied at once, but the order in which they are specified has an influence on the [cascading order](https://www.w3.org/TR/CSS2/cascade.html#cascading-order). Author styles take precedence over user styles. 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:option> <p:option name="transform" required="false" px:type="transform-query" select="'(translator:liblouis)(formatter:dotify)'"><p:documentation xmlns="http://www.w3.org/1999/xhtml"> <h2 px:role="name">Transformer features</h2> <p px: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:option name="result" required="true" px:output="result" px:type="anyDirURI" px:media-type="text"><p:documentation xmlns="http://www.w3.org/1999/xhtml"> <h2 px:role="name">Output file</h2> <p px:role="desc">The output braille file.</p> </p:documentation></p:option> <p:option name="output-file-format" required="false" px:type="transform-query" select="''"><p:documentation xmlns="http://www.w3.org/1999/xhtml"> <h2 px:role="name">Output file format</h2> <p px:role="desc" xml:space="preserve">The file format in which to store the braille result. The file format must be expressed as a list of parenthesis enclosed key-value pairs. For example, to select a file format suited for the U.S., set the option to `(locale:en-US)`. To use the braille character set used in the Netherlands and store to a file with extension ".brl", set the option to `(locale:nl)(file-extension:'.brl')`. If left blank, the braille will be stored in PEF format.</p> </p:documentation></p:option> <p:option name="include-preview" required="false" px:type="boolean" select="'false'"><p:documentation xmlns="http://www.w3.org/1999/xhtml"> <h2 px:role="name">Include preview</h2> <p px:role="desc" xml:space="preserve">Whether or not to include a HTML preview of the braille result.</p> </p:documentation></p:option> <p:option name="preview-table" required="false" px:type="preview-table" select="''"><p:documentation xmlns="http://www.w3.org/1999/xhtml"> <h2 px:role="name">ASCII braille table for HTML preview</h2> <p px:role="desc" xml:space="preserve">The ASCII braille table used to render the HTML and PDF previews. If left blank, the locale information in the input document will be used to select a suitable table.</p> </p:documentation></p:option> <p:option name="preview" required="false" px:output="result" px:type="anyDirURI" px:media-type="text/html" select="''"><p:documentation xmlns="http://www.w3.org/1999/xhtml"> <h2 px:role="name">Preview</h2> <p px:role="desc">An HTML preview of the braille result.</p> </p:documentation></p:option> <p:option name="include-pef" required="false" px:type="boolean" select="'false'"><p:documentation xmlns="http://www.w3.org/1999/xhtml"> <h2 px:role="name">Include PEF</h2> <p px:role="desc" xml:space="preserve">Whether or not to keep the intermediary PEF file (for debugging).</p> </p:documentation></p:option> <p:option name="pef" required="false" px:output="result" px:type="anyDirURI" px:media-type="application/x-pef+xml" select="''"><p:documentation xmlns="http://www.w3.org/1999/xhtml"> <h2 px:role="name">PEF</h2> <p px:role="desc">The intermediary PEF file.</p> </p:documentation></p:option> <p:import href="zedai-to-pef.convert.xpl"> <p:documentation> px:zedai-to-pef </p:documentation> </p:import> <p:import href="xml-to-pef.store.xpl"> <p:documentation> px:xml-to-pef.store </p:documentation> </p:import> <p:import href="http://www.daisy.org/pipeline/modules/zedai-utils/library.xpl"> <p:documentation> px:zedai-load </p:documentation> </p:import> <px:zedai-load name="load"/> <px:zedai-to-pef> <p:input port="source.in-memory"> <p:pipe step="load" port="in-memory.out"/> </p:input> <p:with-option name="stylesheet" select="$stylesheet"/> <p:with-option name="transform" select="$transform"/> <p:with-option name="temp-dir" select="$temp-dir"/> </px:zedai-to-pef> <px:xml-to-pef.store> <p:input port="obfl"> <p:empty/> </p:input> <p:with-option name="name" select="replace(p:base-uri(/),'^.*/([^/]*)\.[^/\.]*$','$1')"> <p:pipe step="main" port="source"/> </p:with-option> <p:with-option name="include-pef" select="$include-pef"/> <p:with-option name="include-preview" select="$include-preview"/> <p:with-option name="output-file-format" select="$output-file-format"/> <p:with-option name="preview-table" select="$preview-table"/> <p:with-option name="output-dir" select="$result"/> <p:with-option name="pef-output-dir" select="$pef"/> <p:with-option name="preview-output-dir" select="$preview"/> </px:xml-to-pef.store> </p:declare-step>