Skip navigation header
Oracle Help File Formats Table of Contents
Contents
Previous topic
Previous
Next topic
Next

Table of Contents File

The Table of Contents (TOC) file is an XML file that describes to the table-of-contents navigator (typically rendered as the Contents tab) the content and layout of the table of contents. The following table describes the elements used in the table of contents file:

Element Description
<toc>

Defines the table of contents. This element contains <tocitem> elements. The <toc> element supports the following attribute:

version - The version of the table of contents file format specification. The version documented here is 1.0.

<tocitem>

Defines a table of contents entry. A <tocitem> element can contain other <tocitem> elements to create a hierarchy of topics. Nesting "tocitem_1" within "tocitem_2" defines "tocitem_1" to be hierarchically contained within "tocitem_2." The <tocitem> element supports the following attributes:

target - The topic ID of the topic to display when this item is selected by a user. Topic IDs are maintained in the map file. A parent node (that is, an item that contains others beneath it in the hierarchy) may or may not include a target. If it does not have a target, selecting that node will simply display its child items and nodes.

text - The text displayed in the table of contents for this item.

image - An image to display next to this item. The value of this attribute is an image ID specified in the map file.

The following example shows a short table of contents file:


  <?xml version='1.0'?>
  <toc version="1.0">
  <tocitem text="Introduction to My Product">
    <tocitem target="aboutmyp" text="About My Product" />
    <tocitem target="architec" text="My Product Architecture" />
    <tocitem target="feature1" text="About Feature One" />
    <tocitem target="feature2" text="About Feature Two" />
    <tocitem target="feature3" text="About Feature Three" />
    <tocitem text="Learning My product">
      <tocitem target="qtour" text="Quick Tour" />
      <tocitem target="docguide" text="Guide to Documentation" />
    </tocitem>
  </tocitem>
  <tocitem text="Step-by-step Procedures">
    <tocitem text="Basic Tasks">
      <tocitem target="task1" text="To..." />
      <tocitem target="task2" text="To..." />
      <tocitem target="task3" text="To..." />
    </tocitem>
    <tocitem text="Working with ...">
      <tocitem target="task4" text="To..." />
      <tocitem target="task5" text="To..." />
    </tocitem>
  </tocitem>
  </toc>

This definition produces the following TOC hierarchy: