Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Common Desktop Environment: Help System Author's and Programmer's Guide > Chapter 2 Organizing and Writing a Help Volume

Accessing Topics

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

Many elements in the DocBook language support an ID attribute. An ID is a unique name used internally to identify topics and elements within topics. Since ID is one of DocBook's common attributes, any element with the common attributes can support an ID attribute.

An ID is defined only once, but multiple hyperlinks and cross-references can refer to the same ID. IDs are not seen by the user.

If you are writing help for an application, IDs are also used by the application to identify particular topics to display when the user requests help.

For example, you might write several topics that describe an application's menus. The IDs that you assign to the topics are used by the application developer. By defining identical IDs within the application code, the developer can integrate specific topics. This allows the application to access and display the correct topic when help is requested for a particular menu.

Rules for ID Names

  • ID strings may contain letters (A - Z and a - z), digits (0 - 9), the period (.), and the minus (-) sign. ID strings must begin with a letter, and be unique at least within the document in which they occur.

  • Case in ID strings is not significant, but is often used to increase readability.

  • ID strings cannot be longer than 128 characters.

  • Each ID within a single help volume must be unique.

Built-in IDs

A few elements have built-in IDs, and so do not support an author-defined ID. Each of the following elements have predefined IDs (shown in parentheses):

<PartIntro>( _hometopic)
<LegalNotice> in <DocInfo>( _copyright)
<Abstract> in <DocInfo>( _abstract)
<Glossary>( _glossary)
<Title> in <DocInfo>( _title)

To Add an ID to a DocBook Element

  • You include the ID string in the opening tag of the element as follows:

    <Element ID="id-string">

    Note that the value of the ID string is enclosed in quotation marks.

All the DocBook elements with the common attributes support an author-defined ID. These are:

  • Abbrev

  • Abstract

  • Anchor

  • Appendix

  • Author

  • BlockQuote

  • BridgeHead

  • Chapter

  • ComputerOutput

  • CorpAuthor

  • DocInfo

  • Entry

  • EntryTbl

  • Example

  • Figure

  • Glossary

  • GlossDiv

  • GlossEntry

  • GlossTerm

  • Graphic

  • Index

  • IndexDiv

  • IndexEntry

  • InformalTable

  • ItemizedList

  • KeyCap

  • LiteralLayout

  • OrderedList

  • Part

  • PrimaryIE

  • ProgramListing

  • Quote

  • RefEntry

  • Reference

  • Screen

  • Sect1 - Sect5

  • See

  • SeeAlso

  • SeeIE

  • Seg

  • SegListItem

  • SegmentedList

  • SegTitle

  • Sidebar

  • SpanSpec

  • Table

  • TBody

  • TFoot

  • TGroup

  • Term

  • Title

  • TitleAbbrev

  • ToC

  • UserInput

  • VariableList

  • VarListEntry

In addition to including IDs with DocBook elements that support them, you can use the Anchor element to set an ID at an arbitrary point within a document. The Anchor can then mark a target for a Link, which will take the Anchor's ID string for the value of its Linkend attribute. Anchor is an inline element that may appear almost anywhere. Anchor is an empty element, with no content.

Anchor can have ID, Pagenum, Remap, Role, and XRefLabel attributes, but only the ID attribute is required. At the minimum, only the Anchor start tag is present, with an ID.

When you activate a link to a location ID, the Help Viewer displays the topic containing the ID and scrolls the window to the ID position.

Syntax of the Anchor element

<anchor id="id-string">

Example of the Anchor element

There is an Anchor <anchor
id="077-ch02-AN-7"> in this sentence.
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.