LinkThe <link> element defines a relationship
to another topic. Links represent the types and roles of topics in a web of
information, and therefore represent navigational links within that web. Links
are typically sorted on output based on their attributes. 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 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.
[edit] Example
<related-links>
<linkpool type="concept">
<link href="czover.htm#sqljsupp"/>
<link href="czesqlj.htm#sqljemb/>
</linkpool>
<related-links>
[edit] Contains
| Doctype
| Content model
|
| ditabase, topic, task, reference, concept, glossary
| ( (
linktext) (optional) then (
desc) (optional) )
|
[edit] Contained by
[edit] Inheritance:
- topic/link
[edit] Attributes
| Name
| Description
| Data Type
| Default Value
| Required?
|
| href
| A hyperlink to an external Web page (URL) or other non-DITA resource,
or to another DITA topic in the same file or in another file. The format attribute
identifies the format of the target. Non-DITA targets use standard URL syntax.
DITA topics are targetted as follows:
Target elsewhere in the same file:
href="#topicid"
First topic in different file:
href="filename.dita"
Specific topic in different file:
href="filename.dita#topicid"
If the URL contains an ampersand
character, the ampersand symbol (&) should be used to indicate that
character
| CDATA
| #IMPLIED
| No
|
| query
| This attribute is deprecated. It may be removed
in the future.
| CDATA
| #IMPLIED
| No
|
| type
| Describes the target of a cross-reference. See The type attribute for
detailed information on supported values and processing implications.
| CDATA
| #IMPLIED (Processed as if the target were of type "topic", or inherited from an ancestor)
| 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 The role attribute for
information on supported values.
| child | sibling | friend | next | previous | cousin | ancestor
| sample | external | [deprecated] 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
cross referenced. See 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.
- Set scope to local when the resource is part of the current set of content.
- Set scope to peer when the resource is part of the current set of content but is not accessible at build time.
- Set scope to external when the resource is not part of the current information set and should open in a new browser window.
- See Using the -dita-use-conref-target value for more information on -dita-use-conref-target.
The processing default is local. If no value is
specified, but the attribute is specified on an ancestor within a map or within
the related-links section, the value will inherit from the closest ancestor.
| peer | external | -dita-use-conref-target)
| #IMPLIED
| No
|
| %univ-atts; (%select-atts;, %id-atts;, %localization-atts;)
| A set of related attributes, described at %univ-atts;
| parameter entity
| PE not
applicable
| Not applicable
|
| %global-atts; (xtrf, xtrc)
| A set of related attributes, described at %global-atts;
| parameter entity
| PE not
applicable
| Not applicable
|
| class, outputclass, keyref
| Common attributes described in Other common DITA attributes
|
|
|
|
TOC: Language Specification 1.1
Parent topic: Related links elements
Next topic: linklist
|
|