xmlto

Convert XML to various output formats

TLDR

Convert to HTML
$ xmlto html [document.xml]
Convert to PDF
$ xmlto pdf [document.xml]
Convert to man page
$ xmlto man [document.xml]
Output directory
$ xmlto -o [output/] html [document.xml]
With stylesheet
$ xmlto -x [custom.xsl] html [document.xml]

SYNOPSIS

xmlto [-o dir] [-x stylesheet] [options] format file

DESCRIPTION

xmlto is a frontend tool for converting XML documents to various output formats using XSL stylesheets. It supports generating HTML, PDF, man pages, plain text, and other formats from XML source files, with particular strength in processing DocBook documentation.The tool acts as a wrapper around XSLT processors and formatting backends, handling the details of stylesheet selection and tool invocation. Custom stylesheets can be provided with the -x option to override the default conversion behavior and tailor the output to specific requirements.xmlto is commonly used in software documentation workflows where source documentation is maintained in DocBook XML format and needs to be published in multiple output formats for different audiences.

PARAMETERS

-o DIR

Output directory.
-x XSL
Custom stylesheet.
-v
Verbose.
--skip-validation
Skip DTD validation.
format
Output format.

INSTALL

sudo apt install xmlto
sudo dnf install xmlto
sudo pacman -S xmlto
sudo apk add xmlto
sudo zypper install xmlto
brew install xmlto
nix profile install nixpkgs#xmlto

CAVEATS

Requires DocBook XSL stylesheets and an XSLT processor (xsltproc) to be installed. PDF output additionally requires a formatting backend like FOP or dblatex. Primarily designed for DocBook XML; other XML vocabularies need custom stylesheets.

HISTORY

xmlto was created for converting XML documents, particularly DocBook, to various output formats.

SEE ALSO

xsltproc(1), docbook2html(1), pandoc(1)