Blame Scripts/Functions/Help/Backends/Docbook/docbook_updateOutputFileXhtml.sh

6b2887
#!/bin/bash
6b2887
#
19f2af
# docbook_updateOutputFilePdf.sh -- This function produces XHTML
19f2af
# output for repository documentation manual, in DocBook XML format.
19f2af
# The procedure was taken from `docbook-style-xsl-1.69.1-5.1'
19f2af
# documentation, which says: ---To publish HTML from your XML
19f2af
# documents, you just need an XSLT engine.---.
6b2887
#
6b2887
# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG
6b2887
#
6b2887
# This program is free software; you can redistribute it and/or modify
6b2887
# it under the terms of the GNU General Public License as published by
6b2887
# the Free Software Foundation; either version 2 of the License, or (at
6b2887
# your option) any later version.
6b2887
#
6b2887
# This program is distributed in the hope that it will be useful, but
6b2887
# WITHOUT ANY WARRANTY; without even the implied warranty of
6b2887
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6b2887
# General Public License for more details.
6b2887
#
6b2887
# You should have received a copy of the GNU General Public License
6b2887
# along with this program; if not, write to the Free Software
6b2887
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
6b2887
#
6b2887
# ----------------------------------------------------------------------
6b2887
# $Id$
6b2887
# ----------------------------------------------------------------------
6b2887
6b2887
function docbook_updateOutputFileXhtml {
6b2887
6b2887
    # Print action message.
6b2887
    cli_printMessage "${MANUAL_BASEFILE}.xhtml" --as-updating-line
6b2887
19f2af
    # Define absolute path to DocBook source file. This is the
19f2af
    # repository documentation manual file where DOCTYPE and ENTITY
19f2af
    # definition lines are set.
19f2af
    local SRC=${MANUAL_BACKEND}/${MANUAL_NAME}.docbook
19f2af
19f2af
    # Define absolute path to PDF target file. This is the final
19f2af
    # location the PDF file produced as result of DocBook to PDF
19f2af
    # transformation will be stored in.
19f2af
    local DST="${MANUAL_BASEFILE}.pdf"
19f2af
19f2af
    # Define absolute path of the XSLT file used to create the
19f2af
    # formatting object (.fo) file.
19f2af
    local XSLT=/usr/share/sgml/docbook/xsl-stylesheets/fo/docbook.xsl
19f2af
19f2af
    # Verify directory where the XHTML files will be stored in.
6b2887
    if [[ ! -d ${MANUAL_BASEFILE}.xhtml ]];then
6b2887
        mkdir ${MANUAL_BASEFILE}.xhtml
6b2887
    fi
6b2887
19f2af
    # Transform DocBook XML to XHTML supressing all stderr output.
19f2af
    xsltproc $XSLT --output $DST $SRC 2> /dev/null
6b2887
6b2887
}