Blame Scripts/Functions/Render/render_convertDocbookToXhtml.sh

e8c00e
#!/bin/bash
e8c00e
#
ab1d67
# render_convertDocbookToXhtml.sh -- This function produces XHTML
e8c00e
# output from docbook template instance using XSL stylesheets as
e8c00e
# reference.
e8c00e
#
e8c00e
# Copyright (C) 2009-2011 Alain Reguera Delgado
fa95b1
#
fa95b1
# This program is free software; you can redistribute it and/or modify
fa95b1
# it under the terms of the GNU General Public License as published by
dcd347
# the Free Software Foundation; either version 2 of the License, or (at
dcd347
# your option) any later version.
fa95b1
#
74a058
# This program is distributed in the hope that it will be useful, but
74a058
# WITHOUT ANY WARRANTY; without even the implied warranty of
e8c00e
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
e8c00e
# General Public License for more details.
e8c00e
#
e8c00e
# You should have received a copy of the GNU General Public License
e8c00e
# along with this program; if not, write to the Free Software
dcd347
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e8c00e
# ----------------------------------------------------------------------
e8c00e
# $Id$
e8c00e
# ----------------------------------------------------------------------
e8c00e
ab1d67
function render_convertDocbookToXhtml {
e8c00e
e8c00e
    # Print action message.
e8c00e
    if [[ -f ${FILE}.xhtml ]];then
e8c00e
        cli_printMessage "${FILE}.xhtml" 'AsUpdatingLine'
e8c00e
    else
e8c00e
        cli_printMessage "${FILE}.xhtml" 'AsCreatingLine'
e8c00e
    fi
e8c00e
e8c00e
    # Define list of XSL stylesheets.
e8c00e
    local XSL='/usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl'
e8c00e
e8c00e
    # Produce xhtml output from docbook template instance using XSL
e8c00e
    # stylesheets as reference.
e8c00e
    xsltproc ${XSL} $INSTANCE > ${FILE}.xhtml
e8c00e
e8c00e
}