DocBook

xslTNG*

These are XSLT 3.0 stylesheets for DocBook. They transform DocBook XML documents into clean, semantically rich HTML5. A CSS stylesheet suitable for online presentation is included. Producing high quality print output with a paged media capable CSS processor is also supported.

Documentation

The current release is documented in the DocBook: xslTNG Reference (EPUB, PDF).

The XSLT Explorer summary of the stylesheets is also available.

Sample output

The stylesheets come with a test suite of 1,676 tests. The test suite report shows the current status of all of the tests. It also includes samples of the expected output for a large collection of test documents.

The following figures highlight some of the new features.

Figure 1. Improved navigation

This chapter of the “Five Interesting Things” sample document explains some of the new features of the stylesheets and highlights the improved navigation in chunked pages.

Screenshot of Chapter 1 of the “Five Interesting Things” sample document.

Screenshot of a rendered DocBook chapter.
Figure 2. Persistent Table of Contents

Chapter 2 shows how it is now possible to include a Table of Contents for the entire document as a fly-out navigation bar in “chunked” output.

Screenshot of Chapter 2, showing the fly-out Table of Contents on the right hand side.

Screenshot of a rendered DocBook chapter.
Figure 4. Annotations

In Chapter 4, annotations are demonstrated. Annotations can be presented either as dialog boxes or end notes. Elements can link to their annotations, or annotations can link to the elements they annotate.

Figure 6 (on a separate page) shows an animated rendering of the popup dialog.

Screenshot of Chapter 4 displaying an annotation rendered as a pop-up dialog box.

Screenshot of a rendered DocBook chapter.
Figure 5. XLink extended links

Chapter 5 includes an example of an extended link, a link to multiple targets. These are rendered dynamically as drop-down lists with JavaScript or as an inline list if JavaScript is unavailable.

Figure 7 (on a separate page) shows an animated rendering of the drop-down list presentation.

Screenshot of Chapter 5 displaying a multi-ended link rendered as a drop-down list.

Screenshot of a rendered DocBook chapter.

An example of the (at the time of writing) experimental “theme selection” feature is also available.

Getting the stylesheets

The stylesheets are available from GitHub and from the DocBook CDN. They are also available through Maven.

The latest release

The latest release is version 2.4.1 published at at 08:42 GMT on 26 Oct 2024.

The cutting edge

The current development branch contains the latest commits since the last release.

Current status: all tests are passing.

Instructions for building the stylesheets from the sources are included in the guide.

Participate!

Please contribute ideas, suggestions, and pull requests for improving the stylesheets!

  • If you use DocBook markup that isn’t represented in the test suite, please submit a test!
  • If you think the HTML transformation of some DocBook markup is wrong, or could be improved, please open an issue!
  • If you have ideas for how to improve the HTML markup, open an issue or make a pull request!
  • If you have a suggestion for alternate screen or print CSS styling, please send it along!
  • If you struggled with something that you think needs a better explanation in the reference guide, let us know!
  • And, obviously, if you think you’ve found a bug, please report it!