DocBook documents are converted to man pages in two steps:
The DocBook source is converted by a XSLT stylesheet into an intermediate XML format, Man-XML.
Man-XML is simpler than DocBook and closer to the man page format; it is intended to make the stylesheets’ job easier.
The stylesheet for this purpose is in
xslt/man/docbook.xsl. For portability, it should
always be referred to by the following URI:
Run this stylesheet with db2x_xsltproc.
Customizing. You can also customize the output by
creating your own XSLT stylesheet — changing parameters or
adding new templates — and importing
Man-XML is converted to the actual man pages by db2x_manxml.
The docbook2man command does both steps automatically, but if any problems occur, you can see the errors more clearly if you do each step separately:
db2x_xsltproc -s man
Options to the conversion stylesheet are described in the man-pages stylesheets reference.
Pure XSLT conversion. An alternative to the
script is the XSLT stylesheet in
xslt/backend/db2x_manxml.xsl. This stylesheet
performs a similar function of converting Man-XML to actual man
pages. It is useful if you desire a pure XSLT solution to man-page
conversion. Of course, the quality of the conversion using this
stylesheet will never be as good as the Perl db2x_manxml, and it runs slower. In
particular, the pure XSLT version currently does not support tables
in man pages, but its Perl counterpart does. For
instructions on how to use the stylesheet, see
Example 1, “Convert to man pages using pure-XSLT