#### Beyond Linux® From Scratch (System V Edition) - Version 12.3

### Chapter 49. Extensible Markup Language (XML)

- Prev

  docbook-xsl-nons-1.79.2

- Next

  itstool-2.0.7

- Up
- Home

# docbook-xsl-ns-1.79.2

## Introduction to DocBook XSL Stylesheets (Namespaced)

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

This package is known to build and work properly using an LFS 12.3 platform.

### Package Information

- Download (HTTP): https://github.com/docbook/xslt10-stylesheets/releases/download/release/1.79.2/docbook-xsl-1.79.2.tar.bz2

- Download MD5 sum: 4a400f0264a19329c7f95f69e098744a

- Download size: 23 MB

- Estimated disk space required: 49 MB

- Estimated build time: less than 0.1 SBU

### Additional Downloads

- Required patch: https://www.linuxfromscratch.org/patches/blfs/12.3/docbook-xsl-1.79.2-stack_fix-1.patch

### DocBook XSL Stylesheets (Namespaced) Dependencies

#### Recommended (at runtime)

libxml2-2.13.6

#### Optional (all used at runtime)

apache-ant-1.10.15 (to produce “webhelp” documents), libxslt-1.1.42 (or any other XSLT processor), to process Docbook documents, Ruby-3.4.2 (to utilize the “epub” stylesheets), Zip-3.0 (to produce “epub3” documents), and Saxon6 and Xerces2 Java (used with apache-ant-1.10.15 to produce “webhelp” documents)

## Installation of DocBook XSL Stylesheets (Namespaced)

First, fix a problem that causes stack overflows when doing recursion:

    patch -Np1 -i ../docbook-xsl-1.79.2-stack_fix-1.patch

BLFS does not install the required packages to run the test suite and provide meaningful results.

Install DocBook XSL Stylesheets by running the following commands as the `root` user:

    install -v -m755 -d /usr/share/xml/docbook/xsl-stylesheets-1.79.2 &&

    cp -v -R VERSION assembly common eclipse epub epub3 extensions fo        \
             highlighting html htmlhelp images javahelp lib manpages params  \
             profiling roundtrip slides template tests tools webhelp website \
             xhtml xhtml-1_1 xhtml5                                          \
        /usr/share/xml/docbook/xsl-stylesheets-1.79.2 &&

    ln -s VERSION /usr/share/xml/docbook/xsl-stylesheets-1.79.2/VERSION.xsl

The documentation for this package is shared with its non-namespaced counterpart, the docbook-xsl-nons-1.79.2 package. Install the latter if you want the documentation.

## Configuring DocBook XSL Stylesheets

### Config Files

`/etc/xml/catalog`

### Configuration Information

Create (or append) and populate the XML catalog file using the following commands as the `root` user (both http and https forms are used because upstream have had both in their documentation):

    if [ ! -d /etc/xml ]; then install -v -m755 -d /etc/xml; fi &&
    if [ ! -f /etc/xml/catalog ]; then
        xmlcatalog --noout --create /etc/xml/catalog
    fi &&

    xmlcatalog --noout --add "rewriteSystem" \
               "http://cdn.docbook.org/release/xsl/1.79.2" \
               "/usr/share/xml/docbook/xsl-stylesheets-1.79.2" \
        /etc/xml/catalog &&

    xmlcatalog --noout --add "rewriteSystem" \
               "https://cdn.docbook.org/release/xsl/1.79.2" \
               "/usr/share/xml/docbook/xsl-stylesheets-1.79.2" \
        /etc/xml/catalog &&

    xmlcatalog --noout --add "rewriteURI" \
               "http://cdn.docbook.org/release/xsl/1.79.2" \
               "/usr/share/xml/docbook/xsl-stylesheets-1.79.2" \
        /etc/xml/catalog &&

    xmlcatalog --noout --add "rewriteURI" \
               "https://cdn.docbook.org/release/xsl/1.79.2" \
               "/usr/share/xml/docbook/xsl-stylesheets-1.79.2" \
        /etc/xml/catalog &&

    xmlcatalog --noout --add "rewriteSystem" \
               "http://cdn.docbook.org/release/xsl/current" \
               "/usr/share/xml/docbook/xsl-stylesheets-1.79.2" \
        /etc/xml/catalog &&

    xmlcatalog --noout --add "rewriteSystem" \
               "https://cdn.docbook.org/release/xsl/current" \
               "/usr/share/xml/docbook/xsl-stylesheets-1.79.2" \
        /etc/xml/catalog &&

    xmlcatalog --noout --add "rewriteURI" \
               "http://cdn.docbook.org/release/xsl/current" \
               "/usr/share/xml/docbook/xsl-stylesheets-1.79.2" \
        /etc/xml/catalog &&

    xmlcatalog --noout --add "rewriteURI" \
               "https://cdn.docbook.org/release/xsl/current" \
               "/usr/share/xml/docbook/xsl-stylesheets-1.79.2" \
        /etc/xml/catalog &&

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

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

## Contents

Installed Files: /usr/share/xml/docbook/xsl-stylesheets-1.79.2/*/*.xsl
Installed Directories: /usr/share/xml/docbook/xsl-stylesheets-1.79.2

### Short Descriptions

`XSL Stylesheets (Namespaced)` | are used for performing transformations on XML files

- Prev

  docbook-xsl-nons-1.79.2

- Next

  itstool-2.0.7

- Up
- Home