DocBook XSL Stylesheets-1.67.2

Introduction to DocBook XSL Stylesheets

The DocBook XSL Stylesheets package contains XSL stylesheets. These are useful for performing transformations on XML DocBook files.

Package information

DocBook XSL Stylesheets dependencies

Required

libxslt-1.1.12

Installation of DocBook XSL Stylesheets

Install DocBook XSL Stylesheets by running the following commands:

install -d /usr/share/xml/docbook/xsl-stylesheets-1.67.2 &&
chown -R root:root . &&
cp -af INSTALL VERSION common eclipse extensions fo html htmlhelp \
    images javahelp lib manpages params profiling template xhtml \
    /usr/share/xml/docbook/xsl-stylesheets-1.67.2 &&
install -d /usr/share/doc/xml &&
cp -af doc/* /usr/share/doc/xml &&
cd /usr/share/xml/docbook/xsl-stylesheets-1.67.2 &&
sh INSTALL &&
if [ ! -f /etc/xml/catalog ]; then mkdir -p /etc/xml; xmlcatalog \
    --noout --create /etc/xml/catalog; fi &&
if [ ! -e /etc/xml/docbook ]; then xmlcatalog --noout --create \
    /etc/xml/docbook; fi &&
xmlcatalog --noout --add "rewriteSystem" \
    "http://docbook.sourceforge.net/release/xsl/1.67.2" \
    "/usr/share/xml/docbook/xsl-stylesheets-1.67.2" /etc/xml/catalog &&
xmlcatalog --noout --add "rewriteURI" \
    "http://docbook.sourceforge.net/release/xsl/1.67.2" \
    "/usr/share/xml/docbook/xsl-stylesheets-1.67.2" /etc/xml/catalog &&
xmlcatalog --noout --add "delegateSystem" \
    "http://docbook.sourceforge.net/release/xsl/" \
    "file:///etc/xml/docbook" /etc/xml/catalog &&
xmlcatalog --noout --add "delegateURI" \
    "http://docbook.sourceforge.net/release/xsl/" \
    "file:///etc/xml/docbook" /etc/xml/catalog

Command explanations

sh INSTALL: This command creates a local catalog for the XSL files.

Configuring DocBook XSL Stylesheets

Config files

/etc/xml/catalog

Configuration Information

The system profile needs to be updated to utilize the new installed catalog. This can be done with the following command:

cat > /etc/profile.d/xsl.sh << "EOF"
# Set up Environment Variable for XSL Processing
export XML_CATALOG_FILES="/usr/share/xml/docbook/\
xsl-stylesheets-1.67.2/catalog.xml /etc/xml/catalog"
EOF

The above installation script creates the files and updates the catalog. Some project stylesheets reference specific versions of XSL stylesheets, like BLFS, which needs the following additional commands. These commands can also serve as an example for using a single XSL version to support any hard coded versions, as needed.

xmlcatalog --noout --add "rewriteSystem" \
    "http://docbook.sourceforge.net/release/xsl/1.65.1" \
    "/usr/share/xml/docbook/xsl-stylesheets-1.67.2" \
    /etc/xml/catalog &&
xmlcatalog --noout --add "rewriteURI" \
    "http://docbook.sourceforge.net/release/xsl/1.65.1" \
    "/usr/share/xml/docbook/xsl-stylesheets-1.67.2" \
    /etc/xml/catalog

Alternatively, other versions can be installed in their own versioned directories and catalog entries made in the following form:

xmlcatalog --noout --add "rewriteSystem" \
    "http://docbook.sourceforge.net/release/xsl/[version]" \
    "/usr/share/xml/docbook/xsl-stylesheets-[version]" \
    /etc/xml/catalog &&
xmlcatalog --noout --add "rewriteURI" \
    "http://docbook.sourceforge.net/release/xsl/[version]" \
    "/usr/share/xml/docbook/xsl-stylesheets-[version]" \
    /etc/xml/catalog
[Note]

Note

To use XSL Stylesheets for GTK-Doc, and possibly other packages, a "current" version is needed instead of a specific version number. In this case, use the following instructions:

xmlcatalog --noout --add "rewriteSystem" \
"http://docbook.sourceforge.net/release/xsl/current" \
"/usr/share/xml/docbook/xsl-stylesheets-1.67.2" \
/etc/xml/catalog &&

xmlcatalog --noout --add "rewriteURI" \
"http://docbook.sourceforge.net/release/xsl/current" \
"/usr/share/xml/docbook/xsl-stylesheets-1.67.2" \
/etc/xml/catalog

This is a workaround that may or may not work for other packages that may need a "current" catalog version.

For LFS 6.0, version 1.65.1 of this package should be installed. In addition, you need to make a symbolic link as described in the INSTALL file of LFS 6.0.

cd /usr/share/xml/docbook/ &&
ln -s xsl-stylesheets-1.65.1 xsl-stylesheets-current

Contents

Installed Files: XSL style sheets for HTML and FO
Installed Directories: /usr/share/xml/docbook/xsl-stylesheets-1.67.2 and /usr/share/doc/xml

Last updated on 2005-04-03 00:40:42 -0700