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

Link File

The link file is an XML file that defines link IDs and associates them with multiple topic IDs (which are defined in the map file). A link ID (or "link keyword") can be used with the alink protocol in a topic file to display a list of links to the topics associated with the ID. In other words, associative links make it possible to associate an HTML link with multiple targets. The user can then choose which target to follow.

The following table describes the elements used in the link file:

Element Description
<link> Defines the link file. The <link> element can contain only <linkitem> elements and their child <linkentry> elements .
<linkitem>

Defines the associative link. The <linkitem> element can only include <linkentry> elements. It has the following required attribute:

topic - Defines the link ID.

<linkentry> Defines an entry in the list of links displayed when an associative link is clicked. This element supports the following attributes:

target - Specifies the topic ID (defined in the map file) of the topic to display when the entry is chosen by the user.

text - The text displayed in the link list.

The following example defines two associative links:


  <?xml version='1.0' ?>
  <link version="1.0">
  
  <linkitem topic="dog_links">
    <linkentry target="about_dogs" text="About Dogs" />
    <linkentry target="dog_species" text="A List of Dog Species" />
    <linkentry target="dog_stories" text="Dog Stories" />
    <linkentry target="dog_lore" text="Dog Lore" />
  </linkitem>
  
  <linkitem topic="cat_links">
    <linkentry target="about_cats" text="About Cats" />
    <linkentry target="cat_species" text="A List of Cat Species" />
    <linkentry target="cat_stories" text="Cat Stories" />
  </linkitem>
  </link>

Using the first link ID from that example, you could define a link <a href="alink:dog_links">dogs</a>. When a user selected the dogs link, the following list of links would be displayed:

About Dogs
  A List of Dog Species
  Dog Stories  
  Dog Lore  

Clicking About Dogs would display the topic mapped to the about_dogs ID in the map file.