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 3 Writing a Help Topic

Creating Hyperlinks

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

A hyperlink references a specific topic or location in a help volume. This requires that the element you want to reference is given a unique ID.

All the DocBook elements with the common attributes can be assigned IDs, including Chapters, Sects, Titles, Lists, Graphics, and Tables.

Four DocBook elements are used in creating hyperlinks: Link, Anchor, OLink, and XRef.

  • Link marks a hypertext link. Link may contain in-line elements, and it has Linkend and Type attributes.

    The Linkend attribute is required. It specifies the target of the link by giving the ID of the element the Link is linked to.

    Link uses the SGML mechanism of IDREF in pointing to an element by its ID. An SGML application may report an IDREF error when the ID specified in a Linkend attribute does not occur in the document set being processed.

    Link has a Type attribute which may take the following values: Jump, JumpNewView, AppDefined, and Man.

    A Jump link is the most common type of hyperlink. When the user chooses a Jump link, the related topic is displayed.

    JumpNewView links are intended for cross-volume links. When the user chooses a JumpNewView link, a new dialog box containing information is displayed.

    An AppDefined link is for invoking some application behavior. To invoke this behavior, the help must be displayed in dialogs created by the application.

    A Man link, when activated, displays a "man page" which gives a brief online explanation of a system command. The information on man pages is not supplied through the DocBook system.

  • Anchor marks a target for a Link. Anchor is an inline element that may appear almost anywhere. Anchor is an empty element, with no content. (Of course any element with an ID can serve as the target of a Link.)

    Anchor has a required ID attribute. At the minimum, only the Anchor start tag is present, with an ID.

  • OLink marks a link that may perform some operation to find its target.

    OLink has a TargetDocEnt attribute, the value of which is the name of a text or data entity already specified by the user.

    OLink has a LinkMode attribute which points by an ID to a ModeSpec (located for convenience in the BookInfo or DocInfo), which contains instructions for operating on the entity named by the TargetDocEnt attribute. For example, the TargetDocEnt may be another book, and the LinkMode attribute may specifiy a ModeSpec that calls for all second-level headings to be searched for a particular phrase.

  • XRef marks a cross reference link to another part of the document.

    Like Link, XRef has Linkend attribute, but like Anchor, it may have no content.

    The Title of the element specified by the Linkend attribute is used as they text of the cross reference.

Examples

This Link gives the label of a hot spot explicitly:

To go there,<Link Linkend="H1-122-ch10-1> click here.</Link>

This Link points to a section and displays its title as the hot spot:

Click to go to <Link Linkend="S1-123-ch12-1"         Endterm="T1-123-ch12-1"></Link>

The following example references the section of the document that has the ID "ch05-s1" and supplies the text of its Title.

See <Xref Linkend="ch05-s1"> for more information.

It might be displayed like this: "See Terminal Emulation and Terminal Type for more information."

There is an Anchor <anchor id="077-ch02-AN-7"> in this sentence.

To Create a Definition Link

If you are linking to a term in the Glossary, use the GlossTerm element as shown:

<GlossTerm>text</GlossTerm>

Whenever you use the GlossTerm element in the text, be sure you include a corresponding GlossEntry in the Glossary that gives the definition of the term.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.