Blame Scripts/Functions/Render/render_docbook_convertToXhtml.sh

e8c00e
#!/bin/bash
e8c00e
#
1afbec
# render_docbook_convertToXhtml.sh -- This function produces XHTML
e8c00e
# output from docbook template instance using XSL stylesheets as
e8c00e
# reference.
e8c00e
#
3b0984
# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG
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.
7ac5a5
#
e8c00e
# ----------------------------------------------------------------------
e8c00e
# $Id$
e8c00e
# ----------------------------------------------------------------------
e8c00e
1afbec
function render_docbook_convertToXhtml {
e8c00e
e8c00e
    # Print action message.
e8c00e
    if [[ -f ${FILE}.xhtml ]];then
0ff158
        cli_printMessage "${FILE}.xhtml" --as-updating-line
e8c00e
    else
0ff158
        cli_printMessage "${FILE}.xhtml" --as-creating-line
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
}