toc

toc — A table of contents.

Synopsis

toc ::=

Attributes

Common attributes and common linking attributes.

No additional attributes.

Additional Constraints

  • If this element is the root element, it must have a version attribute.

Description

The toc element defines a table of contents, or more generally, a list of titles in a document.

Processing expectations

Formatted as a displayed block.

In real life, tocs are usually generated automatically by the presentation system and never have to be represented explicitly in the document source.

Attributes

Common attributes and common linking attributes.

any attribute

Any attribute in any other explicit namespace

Parents

These elements contain toc: appendix, article, book, chapter, part, preface, section, set.

Children

The following elements occur in toc: address, anchor, bibliolist, blockquote, bridgehead, calloutlist, caution, danger, dialogue, drama, epigraph, equation, example, figure, formalgroup, formalpara, glosslist, important, indexterm (db.indexterm.endofrange), indexterm (db.indexterm.singular), indexterm (db.indexterm.startofrange), info (db.titleforbidden.info), info (db.titleonly.info), informalequation, informalexample, informalfigure, informaltable, itemizedlist, literallayout, mediaobject, note, orderedlist, para, poetry, procedure, qandaset, remark, revhistory, sidebar, simpara, simplelist, stagedir, table, task, tip, title, titleabbrev, variablelist, warning.

Examples

 1 |<book xmlns='http://docbook.org/ns/docbook'>
   |<title>DocBook: The Definitive Guide</title>
   |<subtitle>TOC Markup Example</subtitle>
   | 
 5 |<toc>
   |  <title>Table of Contents</title>
   |  <tocdiv>
   |    <title>Preface</title>
   |    <tocentry>Why Read This Book?</tocentry>
10 |    <tocentry>This Book's Audience</tocentry>
   |    <!-- ... -->
   |  </tocdiv>
   |  <tocdiv>
   |    <title>Part I. Introduction</title>
15 |    <tocdiv>
   |      <title>Chapter 1. Getting Started with DocBook</title>
   |      <tocdiv>
   |        <title>A Short DocBook History</title>
   |        <tocentry>The HaL and O'Reilly era</tocentry>
20 |        <tocentry>The Davenport era</tocentry>
   |        <tocentry>The OASIS era</tocentry>
   |      </tocdiv>
   |      <tocdiv>
   |        <title>DocBook V5.0</title>
25 |        <tocdiv>
   |          <title>What's New in DocBook V5.0?</title>
   |          <tocentry>Renamed and removed elements</tocentry>
   |          <!-- ... -->
   |        </tocdiv>
30 |      </tocdiv>
   |    </tocdiv>
   |    <tocdiv>
   |      <title>Chapter 2. Creating DocBook Documents</title>
   |      <tocdiv>
35 |        <title>Making an XML Document</title>
   |        <tocentry>An XML Declaration</tocentry>
   |        <!-- ... -->
   |      </tocdiv>
   |    </tocdiv>
40 |  </tocdiv>
   |</toc>
   | 
   |<preface>
   |  <title>Preface</title>
45 |  <para>DocBook provides a system for writing structured documents using
   |  <acronym>XML</acronym>. …</para>
   | 
   |  <!-- ... -->
   | 
50 |  <section>
   |    <title>Why Read This Book?</title>
   | 
   |    <para>This book is designed to be the clear, concise, normative reference to
   |    the DocBook schema. This book is the official documentation for DocBook.
55 |    </para>
   | 
   |    <!-- ... -->
   |  </section>
   |</preface>
60 | 
   |<!-- ... -->
   | 
   |</book>