3.1.1.4.1 link

The <link> element defines a relationship to another topic. Links are typically sorted when displayed based on their attributes, which define the type or role of the link's target in relation to the current topic.

The optional container elements for link (<linkpool> and <linklist>) allow authors to define groups with common attributes or to preserve the authored sequence of links on output. Links placed in a <linkpool> may be rearranged or removed for display purposes (combined with other local or map-based links); links in a <linklist> should be displayed in the order they are defined. Refer to those elements for additional explanation.

Contains

Doctype

Content model

topic, concept, ditabase, glossary, glossentry, glossgroup, reference, task, machineryTask, learningAssessment, learningContent, learningOverview, learningPlan, learningSummary

( (linktext) (optional) then (desc) (optional) )

Contained by

Doctype

Content model

topic (base), topic (technical content), concept, ditabase, glossary, glossentry, glossgroup, reference, task (strict), task (general), machineryTask, learningAssessment, learningContent, learningOverview, learningPlan, learningSummary

related-links, linklist, linkpool

Inheritance

- topic/link

Example
<related-links>
  <linkpool type="concept">
    <link href="czez.dita#czez" role="next"></link>
    <link href="czunder.dita"></link>
    <link format="html" href="czover.htm#sqljsupp" role="parent">
      <linktext>Overview of the CZ</linktext>
    </link>
    <link format="html" href="czesqlj.htm#sqljemb">
      <linktext>Working with CZESQLJ</linktext>
      <desc>When you work with CZESQLJ, you need to know...</desc>
    </link>
  </linkpool>
<related-links>
Attributes

Name

Description

Data Type

Default Value

Required?

href

Provides a reference to a resource. See 3.4.2.1 The href attribute for detailed information on supported values and processing implications.

CDATA

#IMPLIED

No

query

This attribute is deprecated. It may be removed in the future.

CDATA

#IMPLIED

No

type

Describes the target of a reference. See 3.4.2.8 The type attribute for detailed information on supported values and processing implications.

CDATA

#IMPLIED

No

role

The role attribute defines the role the target topic plays in relationship with the current topic. For example, in a parent/child relationship, the role would be "parent" when the target is the parent of the current topic, and "child" when the target is the child of the current topic. This structure could be used to sort and classify links at display time. See 3.4.2.11 The role attribute for information on supported values. The role attribute values

sample and external are deprecated.

(parent | child | sibling | friend | next | previous | cousin | ancestor | descendant | sample | external | other | -dita-use-​conref-​target)

#IMPLIED

No

otherrole

Indicates an alternate role. This value is used when the role attribute is set to other.

CDATA

#IMPLIED

No

format

The format attribute identifies the format of the resource being referenced. See 3.4.2.9 The format attribute for details on supported values.

CDATA

#IMPLIED

No

scope

The scope attribute identifies the closeness of the relationship between the current document and the target resource. See 3.4.2.10 The scope attribute for more information on values.

(local | peer | external | -dita-use-​conref-​target)

#IMPLIED

No

univ-atts attribute group (includes select-atts, id-atts, and localization-atts groups)

A set of related attributes, described in 3.4.1.3 univ-atts attribute group

     

global-atts attribute group (xtrf, xtrc)

A set of related attributes, described in 3.4.1.2 global-atts attribute group

     

class, outputclass, keyref

Class and outputclass are described in 3.4.1.9 Other common DITA attributes

     

Previous Topic:  3.1.1.4 Related links elements

Next Topic:  3.1.1.4.2 linklist

Parent Topic:  3.1.1.4 Related links elements

Sibling Topics:

3.1.1.4.2 linklist

3.1.1.4.3 linkpool

3.1.1.4.4 linktext

3.1.1.4.5 linkinfo