A;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 "[speech](https://www.w3.org/TR/CSS2/aural.html)" 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. "><p px:role="desc" xml:space="preserve">A list of CSS 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 "[speech](https://www.w3.org/TR/CSS2/aural.html)" 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. </p> </p:documentation> </p:option> <p:option name="lexicon" select="p:system-property('d:org.daisy.pipeline.tts.default-lexicon')" required="false" px:type="anyURI" px:sequence="true" px:separator=" " px:media-type="application/pls+xml"><p:documentation xmlns="http://www.w3.org/1999/xhtml"> <h2 px:role="name">Lexicons</h2> <p px:role="desc" xml:space="preserve">A list of PLS lexicons to take into account. Must be a space separated list of URIs, absolute or relative to the input. Lexicons can also be attached to the source document, using a ['link' element](http://kb.daisy.org/publishing/docs/text-to-speech/pls.html#ex-07). PLS lexicons allow you to define custom pronunciations of words. It is meant to help TTS processors deal with ambiguous abbreviations and pronunciation of proper names. When a word is defined in a lexicon, the processor will use the provided pronunciation instead of the default rendering. The syntax of a PLS lexicon is defined in [Pronunciation Lexicon Specification (PLS) Version 1.0](https://www.w3.org/TR/pronunciation-lexicon), extended with regular expression matching. To enable regular expression matching, add the "regex" attribute, as follows: ~~~xml <lexicon xmlns="http://www.w3.org/2005/01/pronunciation-lexicon" version="1.0" alphabet="ipa" xml:lang="en"> <lexeme regex="true"> <grapheme>([0-9]+)-([0-9]+)</grapheme> <alias>between $1 and $2</alias> </lexeme> </lexicon> ~~~ The regex feature works only with alias-based substitutions. The regex syntax used is that from [XQuery 1.0 and XPath 2.0](https://www.w3.org/TR/xpath-functions/#regex-syntax). Whether or not the regex attribute is set to "true", the grapheme matching can be made more accurate by specifying the "positive-lookahead" and "negative-lookahead" attributes: ~~~xml <lexicon version="1.0" xmlns="http://www.w3.org/2005/01/pronunciation-lexicon" alphabet="ipa" xml:lang="en"> <lexeme> <grapheme positive-lookahead="[ ]+is">SB</grapheme> <alias>somebody</alias> </lexeme> <lexeme> <grapheme>SB</grapheme> <alias>should be</alias> </lexeme> <lexeme xml:lang="fr"> <grapheme positive-lookahead="[ ]+[cC]ity">boston</grapheme> <phoneme>bɔstøn</phoneme> </lexeme> </lexicon> ~~~ Graphemes with "positive-lookahead" will match if the beginning of what follows matches the "position-lookahead" pattern. Graphemes with "negative-lookahead" will match if the beginning of what follows does not match the "negative-lookahead" pattern. The lookaheads are case-sensitive while the grapheme contents are not. The lexemes are matched in this order: 1. Graphemes with regex="false" come first, no matter if there is a lookahead or not; 2. then come graphemes with regex="true" and no lookahead; 3. then graphemes with regex="true" and one or two lookaheads. Within these categories, lexemes are matched in the same order as they appear in the lexicons.</p> </p:documentation> </p:option> <p:option name="audio" select="'false'" required="false" px:type="boolean"><p:documentation xmlns="http://www.w3.org/1999/xhtml"> <h2 px:role="name">Enable text-to-speech</h2> <p px:role="desc">Whether to use a speech synthesizer to produce audio files.</p> </p:documentation> </p:option> <p:option xmlns:_="zedai" name="_:chunk-size" select="'-1'" required="false" px:type="integer"><p:documentation xmlns="http://www.w3.org/1999/xhtml"> <h2 px:role="name">Chunk size</h2> <p px:role="desc" xml:space="preserve">The maximum size of HTML files in kB. Specify "-1" for no maximum. Top-level sections in the ZedAI become separate HTML files in the resulting EPUB, and are further split up if they exceed the given maximum size.</p> </p:documentation> </p:option> <p:import href="zedai-to-epub3.convert.xpl"> <p:documentation> px:zedai-to-epub3 </p:documentation> </p:import> <p:import href="http://www.daisy.org/pipeline/modules/epub-utils/library.xpl"> <p:documentation> px:epub3-store </p:documentation> </p:import> <p:import href="http://www.daisy.org/pipeline/modules/fileset-utils/library.xpl"> <p:documentation> px:fileset-delete </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> <cx:import href="http://www.daisy.org/pipeline/modules/file-utils/library.xsl" type="application/xslt+xml"> <p:documentation> pf:normalize-uri </p:documentation> </cx:import> <p:variable name="input-uri" select="base-uri(/)"/> <px:zedai-load name="load"/> <px:zedai-to-epub3 name="convert"> <p:input port="in-memory.in"> <p:pipe step="load" port="in-memory.out"/> </p:input> <p:input port="tts-config"> <p:pipe step="main" port="tts-config"/> </p:input> <p:with-option xmlns:_="tts" name="stylesheet" select="string-join( for $s in tokenize($_:stylesheet,'\s+')[not(.='')] return resolve-uri($s,$input-uri), ' ')"/> <p:with-option name="lexicon" select="for $l in tokenize($lexicon,'\s+')[not(.='')] return resolve-uri($l,$input-uri)"/> <p:with-option name="output-dir" select="concat($temp-dir,'epub-unzipped/')"/> <p:with-option name="temp-dir" select="concat($temp-dir,'zedai-to-epub3/')"/> <p:with-option name="audio" select="$audio"/> <p:with-option xmlns:_="zedai" name="chunk-size" select="$_:chunk-size"/> <p:with-option name="include-tts-log" select="$include-tts-log"/> </px:zedai-to-epub3> <px:epub3-store name="store"> <p:with-option name="href" select="concat( pf:normalize-uri(concat($result,'/')), replace($input-uri,'^.*/([^/]*?)(\.[^/\.]*)?$','$1'),'.epub')"/> <p:input port="in-memory.in"> <p:pipe port="in-memory.out" step="convert"/> </p:input> </px:epub3-store> <px:fileset-delete cx:depends-on="store"> <p:input port="source"> <p:pipe step="convert" port="temp-audio-files"/> </p:input> </px:fileset-delete> </p:declare-step>