# Section IDs

Section IDs are unique identifiers that you assign to each section of an XML file. You can use the section IDs to cross-reference sections.

The following sections contain suggestions as to how to write section IDs in XML files. The only real requirement for writing section IDs is that the IDs must be unique within a document.

## How to Tag a Section ID in XML

Use the id attribute with the `<sect>` tag. For example:

<sect1 id="gedit-intro">.

## How to Structure Section IDs in Online Help

These guidelines do not apply to the top-level ID associated with the `<article>` tag in a help manual, that is:

<article id="index" lang="en">

Use the following guidelines to write consistent section IDs in documentation:

1. Form the first part of each ID using the filename of the XML file for the documentation. For example, if the filename of the XML book file is `gedit.xml`, the first part of each section ID is gedit. Likewise, if the name of the XML file is `gnome-dictionary.xml`, the first part of the section ID is gnome-dictionary.

2. Follow the first part of the ID with a hyphen. For example:

   gedit-

   gnome-dictionary-

3. If the section ID is a table section ID, follow the first part of the ID with TBL-:

   gedit-TBL-

4. If the section ID is a figure section ID, follow the first part of the ID with FIG-:

   gedit-FIG-

5. Form the remainder of the ID using an abbreviated form of the section title. Here are some examples:

   - If the title of the section is Introduction, use gedit-intro.

   - If the title of the section is Preferences, use gedit-prefs.

   - If the title of the section is Save Tabbed Section, which is a subsection of Preferences, you can use gedit-prefs-save.

   - If the title of the section is To Save a File, use an ID similar to gedit-save-file.

   - If the title of a figure is gedit Main Window, use an ID similar to gedit-FIG-main-window.

   The important thing is that all section IDs are unique within each XML file.

## When to Change Section IDs for Online Help

If you receive a request from the developer of an application or applet to change the name of the XML file for a manual, you should also change the section IDs in your document to match the new filename. For example, if the Fish Applet is renamed the Wanda Applet and the filename changes from `fish.xml` to `wanda.xml`, you should change the first part of each section ID from fish- to wanda-.

Do not change the XML filename or section IDs without the approval of the developer as this impacts the help calls from the application to the online help manuals.

## How to Structure Section IDs in a Book

Use the following guidelines to write consistent section IDs in a book:

1. Form the first part of every ID using the name of the XML file that the ID is located in. For example, for a file called `windows.xml`, use windows.

2. Follow the first part of the ID with a hyphen:

   windows-

3. If the section ID is a table section ID, follow the first part of the ID with TBL-:

   windows-TBL-

4. If the section ID is a figure section ID, follow the first part of the ID with FIG-:

   windows-FIG-

5. Complete the section ID with a number that uniquely identifies the section ID:

   windows-123

   windows-TBL-456

   windows-FIG-789

It is important that all section IDs are unique within all the XML files in the book.

## When to Change Section IDs in a Book

If you change the name of a book file, you should change the section IDs to match the new filename. For example, if the `windows.xml` file is renamed `dialogs.xml`, you should change the first part of the section IDs to dialogs-.

Changing section IDs in a book might affect online help calls. Contact the developer responsible for the help calls before you change any section IDs. If there are negative implications associated with changing the section IDs, you should not change the IDs to match the filename.