| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html lang="en"> |
| <head> |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > |
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css"> |
| <script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"></script> |
| <title>Table of contents (toc) files</title> |
| </head> |
| <body> |
| |
| <h2>Table of contents (toc) files</h2> |
| |
| <P > |
| Now that we have our sample content files we can create a table of contents (<b>toc</b>) |
| file. A toc file defines the key entry points into the HTML content files by mapping a topic |
| label to a reference in one of the HTML files. </P> |
| <P > |
| Applications that are being migrated to the platform can reuse existing documentation by |
| using the toc file to define entry points into that documentation. </P> |
| <P > |
| A plug-in can have one or more toc files. Our example documentation is organized into three main categories: concepts, tasks and reference. How do we make |
| toc files that represent this structure?</P> |
| <P > |
| We could make one large toc file, or we could create a separate toc file for each main category of content. This decision should be made according to the way your documentation teams work together. |
| If a different author owns each category, it might be preferable to keep |
| separate toc files for each category. It is not dictated by the platform architecture. </P> |
| <P > |
| In this example, we will create a toc file for each major content category. For such a small number of files, |
| having separate toc files for each category may not be necessary. We |
| will build this example as if we had many more files or had separate authors who |
| own each content category.</P> |
| <P > |
| Our files look like this:</P> |
| |
| <H4>toc_Concepts.xml</H4> |
| <pre> |
| <toc label="Concepts"> |
| <topic label="Concept1" href="html/concepts/concept1.html"> |
| <topic label="Concept1_1" href="html/concepts/concept1_1.html"/> |
| <topic label="Concept1_2" href="html/concepts/concept1_2.html"/> |
| </topic> |
| </toc> |
| </pre> |
| |
| <H4> |
| toc_Tasks.xml</H4> |
| <pre> |
| <toc label="Tasks"> |
| <topic id="plainTasks" label="Plain Stuff"> |
| <topic label="Task1" href="html/tasks/task1.html"/> |
| <topic label="Task2" href="html/tasks/task2.html"/> |
| </topic> |
| <topic id="funTasks" label="Fun Stuff" > |
| <topic label="Task3_1" href="html/tasks/task3_1.html"/> |
| <topic label="Task3_2" href="html/tasks/task3_2.html"/> |
| </topic> |
| </toc> |
| </pre> |
| |
| <H4> |
| toc_Ref.xml</H4> |
| <pre> |
| <toc label="Reference"> |
| <topic label="Ref1" href="html/ref/ref1.html"/> |
| <topic label="Ref2" href="html/ref/ref2.html"/> |
| </toc> |
| </pre> |
| <P > |
| A topic can be a simple link to content. |
| For example, "Task1" provides a <b>label</b> |
| and an <b>href</b> linking to the content. A |
| topic can also be a hierarchical grouping of sub topics with no content of its |
| own. For example, "Fun Stuff" has only a <b>label</b> |
| and sub topics, but no <b>href</b> . Topics can |
| do both, too. "Concept1" has an <b>href</b> |
| and sub topics. </P> |
| |
| <p><b>Dynamic content</b></p> |
| |
| <p> |
| Dynamic content is available for the table of contents in the form of |
| <a href="ua_dynamic_filters.htm">filters</a> and <a href="ua_dynamic_extensions.htm"> |
| extensions</a>. For example, you may want a topic to show up in the table of contents |
| only when running on a specific operating system. |
| </p> |
| |
| <p> |
| <a href="ua_dynamic_includes.htm">Includes</a> are not supported here because they |
| are not needed; use <a href="ua_help_content_nested.htm">links</a> instead. |
| </p> |
| |
| </body> |
| </html> |