From b62abf9d19ff1f5527584865bb1113389b3d2484 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jun 16 2011 03:53:06 +0000 Subject: Update render_doBaseActions.sh. --- diff --git a/Scripts/Functions/Render/render_doBaseActions.sh b/Scripts/Functions/Render/render_doBaseActions.sh index 2b1f08f..683e303 100755 --- a/Scripts/Functions/Render/render_doBaseActions.sh +++ b/Scripts/Functions/Render/render_doBaseActions.sh @@ -150,11 +150,18 @@ function render_doBaseActions { # Define final location of template file. TEMPLATE=${FILE} - # Print final location of template file. - if [[ ! -f "$TEMPLATE" ]];then - cli_printMessage "`gettext "None"`" --as-design-line + # Validate XML-based document before processing it. This + # step is very important in order to detect document + # malformations and warn you about it, so you can correct + # them before processing the document as input. + if [[ -f $TEMPLATE ]];then + cli_printMessage "$TEMPLATE" --as-validating-line + xmllint --valid --noent --noout $TEMPLATE + if [[ $? -ne 0 ]];then + cli_printMessage "`gettext "Validation failed."`" --as-error-line + fi else - cli_printMessage "$TEMPLATE" --as-design-line + cli_printMessage "`gettext "None"`" --as-validating-line fi # Define final location of output directory.