| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function docbook_prepareXsl4Using { |
| |
| local XSL_TEMPLATE_FILE='' |
| local XSL_TEMPLATE_FILES=$@ |
| local COUNT=0 |
| |
| for XSL_TEMPLATE_FILE in $XSL_TEMPLATE_FILES;do |
| |
| XSL_TEMPLATE[((++${#XSL_TEMPLATE[*]}))]="${XSL_TEMPLATE_FILE}" |
| XSL_INSTANCE[((++${#XSL_INSTANCE[*]}))]="$(cli_getTemporalFile ${XSL_TEMPLATE_FILE})" |
| |
| |
| |
| |
| |
| COUNT=$(( ${#XSL_INSTANCE[*]} - 1 )) |
| |
| |
| cp ${XSL_TEMPLATE[$COUNT]} ${XSL_INSTANCE[$COUNT]} |
| |
| |
| |
| |
| |
| |
| if [[ $XSL_TEMPLATE_FILE =~ 'docbook2fo\.xsl$' ]];then |
| XSL_INSTANCE_FINAL=${XSL_INSTANCE[$COUNT]} |
| elif [[ $XSL_TEMPLATE_FILE =~ 'docbook2xhtml-(chunks|single)\.xsl$' ]];then |
| XSL_INSTANCE_FINAL=${XSL_INSTANCE[${COUNT}]} |
| sed -i -r "s!=XSL_XHTML_COMMON=!${XSL_INSTANCE_FINAL}!" ${XSL_INSTANCE_FINAL} |
| else |
| cli_replaceTMarkers ${XSL_INSTANCE[${COUNT}]} |
| fi |
| |
| done |
| |
| |
| |
| cli_checkFiles $XSL_INSTANCE_FINAL |
| |
| } |