<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:px="http://www.daisy.org/ns/pipeline/xproc" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xs="http://www.w3.org/2001/XMLSchema" type="px:dtbook-to-pef.store" version="1.0" exclude-inline-prefixes="#all" name="main"> <p:input port="dtbook" primary="false"/> <p:input port="obfl" primary="false"> <p:empty/> </p:input> <p:input port="css" primary="false"> <p:empty/> </p:input> <p:input port="pef" primary="true"> <p:empty/> </p:input> <p:option name="output-dir" select="''"/> <p:option name="pef-output-dir" select="''"/> <p:option name="preview-output-dir" select="''"/> <p:option name="pdf-output-dir" select="''"/> <p:option name="obfl-output-dir" select="''"/> <p:option name="css-output-dir" select="''"/> <p:option name="include-preview" select="'false'"/> <p:option name="include-pdf" select="'false'"/> <p:option name="include-pef" select="'false'"/> <p:option name="include-css" select="false()" cx:as="xs:boolean"/> <p:option name="medium" select="'embossed AND (-daisy-file-format:pef)'"> <p:documentation xmlns="http://www.w3.org/1999/xhtml"> <p>The target medium</p> </p:documentation> </p:option> <p:option name="preview-table" select="''"/> <p:option name="pdf-offset-x" select="'0'"/> <p:option name="pdf-offset-y" select="'0'"/> <p:option name="pdf-scale-font" select="'100%'"/> <p:option name="pdf-font-color" select="'#ffffff'"/> <p:import href="xml-to-pef.store.xpl"> <p:documentation> px:xml-to-pef.store </p:documentation> </p:import> <p:sink/> <p:group px:progress=".1"> <p:documentation> Store DTBook with inline CSS </p:documentation> <p:variable name="name" select="replace(p:base-uri(/),'^.*/([^/]*)\.[^/\.]*$','$1')"> <p:pipe step="main" port="dtbook"/> </p:variable> <p:count> <p:input port="source"> <p:pipe step="main" port="css"/> </p:input> </p:count> <p:choose> <p:when px:message="Storing DTBook with inline CSS" test="$include-css and $css-output-dir!='' and number(string(/*))>0"> <p:store encoding="utf-8" omit-xml-declaration="false"> <p:input port="source"> <p:pipe step="main" port="css"/> </p:input> <p:with-option name="href" select="concat($css-output-dir,'/',$name,'.xml')"/> </p:store> </p:when> <p:otherwise> <p:sink/> </p:otherwise> </p:choose> </p:group> <px:xml-to-pef.store px:progress=".9"> <p:input port="pef"> <p:pipe step="main" port="pef"/> </p:input> <p:input port="obfl"> <p:pipe step="main" port="obfl"/> </p:input> <p:with-option name="name" select="replace(p:base-uri(/),'^.*/([^/]*)\.[^/\.]*$','$1')"> <p:pipe step="main" port="dtbook"/> </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="include-pdf" select="$include-pdf"/> <p:with-option name="medium" select="$medium"/> <p:with-option name="preview-table" select="$preview-table"/> <p:with-option name="pdf-offset-x" select="$pdf-offset-x"/> <p:with-option name="pdf-offset-y" select="$pdf-offset-y"/> <p:with-option name="pdf-scale-font" select="$pdf-scale-font"/> <p:with-option name="pdf-font-color" select="$pdf-font-color"/> <p:with-option name="output-dir" select="$output-dir"/> <p:with-option name="pef-output-dir" select="$pef-output-dir"/> <p:with-option name="preview-output-dir" select="$preview-output-dir"/> <p:with-option name="pdf-output-dir" select="$pdf-output-dir"/> <p:with-option name="obfl-output-dir" select="$obfl-output-dir"/> </px:xml-to-pef.store> </p:declare-step>