link
link — A hypertext link.
Synopsis
link ::=
- Zero or more of:
- text
inlinestagedir
templatename
- Bibliography inlines
- Graphic inlines
- Indexing inlines
- Linking inlines
- Markup inlines
- Math inlines
- Product inlines
- Publishing inlines
abbrev
acronym
coref
date
emphasis
(db.emphasis)firstterm
(db._firstterm)firstterm
(db.firstterm)footnote
footnoteref
foreignphrase
(db.foreignphrase)glossterm
(db._glossterm)glossterm
(db.glossterm)phrase
(db.phrase)quote
(db.quote)revnumber
subscript
superscript
wordasword
- Technical inlines
- Ubiquitous inlines
abbrev
acronym
alt
anchor
biblioref
coref
date
emphasis
(db._emphasis)firstterm
(db._firstterm)footnote
footnoteref
foreignphrase
(db._foreignphrase)glossterm
(db._glossterm)indexterm
(db.indexterm.endofrange)indexterm
(db.indexterm.singular)indexterm
(db.indexterm.startofrange)inlinemediaobject
link
olink
phrase
(db._phrase)quote
(db._quote)remark
subscript
superscript
trademark
wordasword
xref
Attributes
Common attributes and common linking attributes.
Additional attributes:
- endterm (IDREF)
- xrefstyle
Required attributes are shown in bold.
Description
The link
is a general-purpose hypertext element.
Usually, link
surrounds the text that should be made “hot”
(unlike xref
which must generate the text), but the
endterm
attribute can be used to copy text
from another element.
The link
can have either a
linkend
attribute or an
xlink:href
attribute:
If it has a
linkend
attribute,link
creates an internal cross-reference analagous toxref
except that the author provides the link text.If it has an
xlink:href
attribute,link
is the equivalent of an HTML anchor (html:a href="..."
) for cross-reference with a Uniform Resource Identifier (URI).(In this form, it replaces the
ulink
element from DocBook 4.x and earlier.)
Processing expectations with linkend
Formatted inline.
If the link
element has content, then that content is
processed for output as the “hot” text. If the link
element
has content and an endterm
attribute,
then the content is used and the endterm
is ignored. If the link
element has an endterm
attribute and no content, then the
content of the element pointed to by
endterm
is used as the “hot” text.
Processing expectations with xlink:href
Formatted inline.
When rendered online, it is natural to make the content of the
link
element an active link. When rendered in print media,
the URI might be ignored, printed after the text of
the link, printed as a footnote, or rendered in some other way.
When the content of the link
element is empty, the
content of the xlink:href
attribute
should be rendered as the text of the link. (In which case, naturally,
it should be rendered even in print media.)
Attributes
Common attributes and common linking attributes.
- any attribute
Any attribute in any other explicit namespace
- endterm
Points to the element whose content is to be used as the text of the link
- xrefstyle
Specifies a keyword or keywords identifying additional style information
Parents
These elements contain link
: abbrev
, acronym
, address
, artpagenums
, attribution
, authorinitials
, bibliocoverage
, biblioid
, bibliomisc
, bibliomixed
, bibliomset
, bibliorelation
, bibliosource
, bridgehead
, citation
, citebiblioid
, citetitle
, city
, confdates
, confnum
, confsponsor
, conftitle
, contractnum
, contractsponsor
, contrib
, country
, edition
, email
, emphasis
(db._emphasis), emphasis
(db.emphasis), entry
, fax
, firstname
, firstterm
(db._firstterm), firstterm
(db.firstterm), foreignphrase
(db._foreignphrase), foreignphrase
(db.foreignphrase), givenname
, glosssee
, glossseealso
, glossterm
(db._glossterm), glossterm
(db.glossterm), holder
, honorific
, inlinestagedir
, issuenum
, jobtitle
, label
, line
, lineage
, link
, literal
, literallayout
, mathphrase
, member
, meta
(db.meta.content), olink
, optional
, orgdiv
, orgname
, otheraddr
, othername
, pagenums
, para
, personname
, phone
, phrase
(db._phrase), phrase
(db.phrase), pob
, postcode
, primary
, productname
, productnumber
, publishername
, quote
(db._quote), quote
(db.quote), releaseinfo
, remark
, revnumber
, revremark
, secondary
, see
, seealso
, seriesvolnums
, shortaffil
, simpara
, state
, street
, subscript
, subtitle
, superscript
, surname
, templatename
, term
, termdef
, tertiary
, title
, titleabbrev
, trademark
, uri
, volumenum
, wordasword
, year
.
Children
The following elements occur in link
: text, abbrev
, acronym
, alt
, anchor
, author
, biblioref
, citation
, citebiblioid
, citetitle
, coref
, date
, editor
, email
, emphasis
(db._emphasis), emphasis
(db.emphasis), firstterm
(db._firstterm), firstterm
(db.firstterm), footnote
, footnoteref
, foreignphrase
(db._foreignphrase), foreignphrase
(db.foreignphrase), glossterm
(db._glossterm), glossterm
(db.glossterm), indexterm
(db.indexterm.endofrange), indexterm
(db.indexterm.singular), indexterm
(db.indexterm.startofrange), inlineequation
, inlinemediaobject
, inlinestagedir
, jobtitle
, link
, literal
, olink
, optional
, org
, orgname
, person
, personname
, phrase
(db._phrase), phrase
(db.phrase), productname
, productnumber
, quote
(db._quote), quote
(db.quote), remark
, revnumber
, subscript
, superscript
, templatename
, termdef
, trademark
, uri
, wordasword
, xref
.
See Also
Examples
1 |<article xmlns="http://docbook.org/ns/docbook"
|xmlns:xlink="http://www.w3.org/1999/xlink">
|<title>Example links</title>
|5 |
<para>In this sentence, <link linkend='nextsect'>this</link>
|word is hot and points to the following section.
|</para>
||
<para>In this sentence, the hot text of the link,
10 |<link linkend='nextsect' endterm="nextsect.title"/>,
|is just the section title.
|</para>
||
<para>In this sentence,
15 |<link xlink:href="http://docbook.org/">this</link> word is
|hot and points to DocBook website.
|</para>
||
<para>In this sentence, <link xlink:href="#nextsect">this</link>
20 |word is hot and also points to the following section. Note,
|however, that this is dependent on the link target appearing
|in the same document as the link and may not work consistently.
|Use <tag class="attribute">linkend</tag> instead.
|</para>
25 ||
<section xml:id='nextsect'>
|<title xml:id="nextsect.title">A Subsection</title>
|<para>This section only exists to be the target of a link.
|</para>
30 |</section>
||
</article>