<p:declare-step xmlns: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:dp2="http://www.daisy.org/ns/pipeline/" xmlns:obfl="http://www.daisy.org/ns/2011/obfl" version="1.0" type="px:obfl-to-pef" name="main"> <p:input port="source" sequence="false"/> <p:output port="result" sequence="false"/> <p:option name="identifier" required="false" select="''"/> <p:input port="parameters" kind="parameter" primary="false"/> <p:declare-step type="pxi:obfl-to-pef"> <p:input port="source" sequence="false"/> <p:output port="result" sequence="false"/> <p:option name="locale" required="true"/> <p:option name="mode" required="true"/> <p:option name="braille-charset" required="true"/> <p:option name="identifier" required="false" select="''"/> <p:option name="style-type" required="false" select="''"/> <p:option name="css-text-transform-definitions" required="false" select="''"/> <p:option name="css-hyphenation-resource-definitions" required="false" select="''"/> <p:option name="css-counter-style-definitions" required="false" select="''"/> <p:option name="has-volume-transition" required="true"/> <p:input port="parameters" kind="parameter" primary="false"/> </p:declare-step> <p:add-attribute match="*[@translate='pre-translated-text-css']" attribute-name="translate" attribute-value="(input:braille)(input:text-css)(output:braille)"/> <p:choose> <p:when test="exists(/obfl:obfl/obfl:meta/dp2:braille-charset)"> <p:label-elements match="*[@translate[not(.='')]]" attribute="translate" label="concat(@translate,'(braille-charset:"',/obfl:obfl/obfl:meta/dp2:braille-charset,'")')"/> </p:when> <p:otherwise> <p:identity/> </p:otherwise> </p:choose> <p:delete match="/obfl:obfl/obfl:meta/dp2:style-type"> </p:delete> <p:delete match="/obfl:obfl/obfl:meta/dp2:default-mode"> </p:delete> <p:delete match="/obfl:obfl/obfl:meta/dp2:css-text-transform-definitions"> </p:delete> <p:delete match="/obfl:obfl/obfl:meta/dp2:css-hyphenation-resource-definitions"> </p:delete> <p:delete match="/obfl:obfl/obfl:meta/dp2:css-counter-style-definitions"> </p:delete> <p:delete match="/obfl:obfl/obfl:meta/dp2:braille-charset"> </p:delete> <pxi:obfl-to-pef> <p:with-option name="locale" select="(/obfl:obfl/@xml:lang,'und')[1]"/> <p:with-option name="mode" select="/obfl:obfl/obfl:meta/dp2:default-mode"> <p:pipe step="main" port="source"/> </p:with-option> <p:with-option name="braille-charset" select="/obfl:obfl/obfl:meta/dp2:braille-charset"> <p:pipe step="main" port="source"/> </p:with-option> <p:with-option name="identifier" select="$identifier"/> <p:with-option name="style-type" select="/obfl:obfl/obfl:meta/dp2:style-type[1]"> <p:pipe step="main" port="source"/> </p:with-option> <p:with-option name="css-text-transform-definitions" select="/obfl:obfl/obfl:meta/dp2:css-text-transform-definitions"> <p:pipe step="main" port="source"/> </p:with-option> <p:with-option name="css-hyphenation-resource-definitions" select="/obfl:obfl/obfl:meta/dp2:css-hyphenation-resource-definitions"> <p:pipe step="main" port="source"/> </p:with-option> <p:with-option name="css-counter-style-definitions" select="/obfl:obfl/obfl:meta/dp2:css-counter-style-definitions"> <p:pipe step="main" port="source"/> </p:with-option> <p:with-option name="has-volume-transition" select="if (/*/obfl:volume-transition) then 'true' else 'false'"> <p:pipe step="main" port="source"/> </p:with-option> <p:input port="parameters"> <p:pipe step="main" port="parameters"/> </p:input> </pxi:obfl-to-pef> </p:declare-step>