How To Install docbook-xsl-ns on Ubuntu 18.04

In this tutorial we learn how to install docbook-xsl-ns on Ubuntu 18.04. docbook-xsl-ns is stylesheets for processing DocBook 5 XML to various output formats

Introduction

In this tutorial we learn how to install docbook-xsl-ns on Ubuntu 18.04.

What is docbook-xsl-ns

docbook-xsl-ns is:

These are modular XSL stylesheets for processing documents composed with DocBook 5 XML and its derivatives. Unlike in docbook-xsl the DocBook namespace prefix has been added to element names in pattern matches and expressions. However processing of DocBook 4 documents is also possible with these stylesheets. For a more detailed explanation read http://www.sagehill.net/docbookxsl/ProcesingDb5.html.

The stylesheets provide XSLT transformations for (X)HTML, WordML, HTML Help, JavaHelp, Man page (nroff), Website, Eclipse Platform Help file and XSL Formatting Object (XSL-FO) output. The latter can be further processed to a number of print formats using FOP or TeX-based tools.

The stylesheets are modular in the sense that you can extend and, to some extent, customize them. The documentation is included in a separate package.

There are three methods to install docbook-xsl-ns on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install docbook-xsl-ns Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install docbook-xsl-ns using apt-get by running the following command:

sudo apt-get -y install docbook-xsl-ns

Install docbook-xsl-ns Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install docbook-xsl-ns using apt by running the following command:

sudo apt -y install docbook-xsl-ns

Install docbook-xsl-ns Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install docbook-xsl-ns using aptitude by running the following command:

sudo aptitude -y install docbook-xsl-ns

How To Uninstall docbook-xsl-ns on Ubuntu 18.04

To uninstall only the docbook-xsl-ns package we can use the following command:

sudo apt-get remove docbook-xsl-ns

Uninstall docbook-xsl-ns And Its Dependencies

To uninstall docbook-xsl-ns and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove docbook-xsl-ns

Remove docbook-xsl-ns Configurations and Data

To remove docbook-xsl-ns configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge docbook-xsl-ns

Remove docbook-xsl-ns configuration, data, and all of its dependencies

We can use the following command to remove docbook-xsl-ns configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge docbook-xsl-ns

References

Summary

In this tutorial we learn how to install docbook-xsl-ns package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.