<related-links>
Related links are a group of references to other topics or external information related to the current topic.
Rendering expectations
Related links usually are displayed at the end of the topic, although some web-based help systems might display them in a separate navigation frame.
Links specified within the <related-links>
element typically are displayed together with any links that are generated based on the hierarchy of
the DITA map.
PDF or print-oriented output commonly ignores hierarchical links such as those with roles of ancestor, parent, child, descendant, next, previous, or sibling.
Processing expectations
Attributes that cascade between topic references in a map, such as the
@scope
and @format
attributes, also cascade from
this element to contained links.
Content model
(
<link>
|
<linklist>
|
<linkpool>
)*
Attributes
The following attributes are available on this element: universal
attributes, @format
, @otherrole
, @role
, @scope
, and @type
.
The following attributes are available on this element: universal attributes and the attributes defined below.
@format
(link-relationship attributes)- Specifies the format of the resource that is referenced. See The format attribute for detailed information on supported values and processing implications.
- Specifies the format of the resource that is referenced. See The format attribute for detailed information on supported values and processing implications.
- Specifies the format of the resource that is referenced. See The format attribute for detailed information on supported values and processing implications.
@otherrole
- Specifies an alternate role for a link relationship when the
@role
attribute is set to other. @role
- Specifies the role that a linked 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 can be used to sort and classify links when rendering.
The following values are valid:
- ancestor
- Indicates a link to a topic above the parent topic.
- child
- Indicates a link to a direct child such as a directly nested or dependent topic.
- cousin
- Indicates a link to another topic in the same hierarchy that is not a parent, child, sibling, next, or previous.
- descendant
- Indicates a link to a topic below a child topic.
- friend
- Indicates a link to a similar topic that is not necessarily part of the same hierarchy.
- next
- Indicates a link to the next topic in a sequence.
- other
- Indicates any other kind of relationship or role. The
type of role is specified as the value for the
@otherrole
attribute. - parent
- Indicates a link to a topic that is a parent of the current topic.
- previous
- Indicates a link to the previous topic in a sequence.
- sibling
- Indicates a link between two children of the same parent topic.
- -dita-use-conref-target
- See Using the -dita-use-conref-target value for more information.
Example
This section is non-normative.
The following code sample shows how the
<related-link>
element is used to specify stable links to external and local
information:
<related-links>
<link href="http://www.example.org" scope="external" format="html">
<linktext>Example #1</linktext>
</link>
<link href="additional-details.dita">
<!-- Link to a local topic for more detail. The link text is generated
based on the title of the topic. -->
</link>
</related-links>