XML technologies / DocBook / Generating (X)HTML / Generating tables of contents / Excluding elements from the table of contents
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
To exclude certain structural-element titles from the table of contents, use this approach: set the role attribute of the relevant element to NoToc and add a short template rule:
<xsl:template match="sect1[@role='NoToc']" mode="toc"/>This template rule matches all sect1 elements in mode toc. The DocBook stylesheets generate a title for all elements containing mode="toc". In the example above, the template rule is empty, so no title and therefore no table-of-contents entry is generated.
Copyright © 2009 Millin Verlag
You may print the online version for your private use.
Otherwise, this chapter from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Millin Verlag, Siebengebirgsring 36, 53797 Lohmar, info(at)millin.de
back to top