From 7dba2b98b12ea1543f3499e8e320e57d41a3adf1 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Sep 09 2012 01:28:04 +0000 Subject: Update `trunk/Scripts/Bash/Functions/Render/render_doTranslation.sh' file. --- diff --git a/Scripts/Bash/Functions/Render/render_doTranslation.sh b/Scripts/Bash/Functions/Render/render_doTranslation.sh index b72cbeb..15a47ba 100755 --- a/Scripts/Bash/Functions/Render/render_doTranslation.sh +++ b/Scripts/Bash/Functions/Render/render_doTranslation.sh @@ -40,6 +40,15 @@ function render_doTranslation { COMMAND="/bin/zcat" fi + # Move into template's directory in order to satisfy relative + # entities. Take care that some XML documents (e.g., DocBook + # documents) can use entities relatively from their base + # locations. In order to process such documents, it is necessary + # to put the template directory up in the directory stack and + # create the instance from there. Thus, it is possible to expand + # relative entities correctly when validating the document. + pushd $(dirname $TEMPLATE) > /dev/null + # Verify translation file existence and create template # instance accordingly. if [[ -f ${TRANSLATION} ]];then @@ -64,7 +73,7 @@ function render_doTranslation { else - # Create the non-translated instance of design model. + # Create the non-translated instance of design model. if [[ ${TEMPLATE_HAS_DOCTYPE} -eq 0 ]];then ${COMMAND} ${TEMPLATE} | xmllint --valid --noent - > ${INSTANCE} else @@ -73,6 +82,9 @@ function render_doTranslation { fi + # Return to where we were. + popd > /dev/null + # Verify instance existence. cli_checkFiles $INSTANCE