link

$Revision: 1666 $

$Date: 2002-06-12 07:19:37 -0400 (Wed, 12 Jun 2002) $

link — A hypertext link

Synopsis

Mixed Content Model

link ::=
(#PCDATA|footnoteref|xref|biblioref|abbrev|acronym|citation|
 citerefentry|citetitle|citebiblioid|emphasis|firstterm|
 foreignphrase|glossterm|termdef|footnote|phrase|orgname|quote|
 trademark|wordasword|personname|link|olink|ulink|action|
 application|classname|methodname|interfacename|exceptionname|
 ooclass|oointerface|ooexception|package|command|computeroutput|
 database|email|envar|errorcode|errorname|errortype|errortext|
 filename|function|guibutton|guiicon|guilabel|guimenu|guimenuitem|
 guisubmenu|hardware|interface|keycap|keycode|keycombo|keysym|
 literal|code|constant|markup|medialabel|menuchoice|mousebutton|
 option|optional|parameter|prompt|property|replaceable|
 returnvalue|sgmltag|structfield|structname|symbol|systemitem|uri|
 token|type|userinput|varname|nonterminal|anchor|author|
 authorinitials|corpauthor|corpcredit|modespec|othercredit|
 productname|productnumber|revhistory|remark|subscript|
 superscript|inlinegraphic|inlinemediaobject|inlineequation|
 synopsis|cmdsynopsis|funcsynopsis|classsynopsis|fieldsynopsis|
 constructorsynopsis|destructorsynopsis|methodsynopsis|indexterm|
 beginpage)*

Attributes

Common attributes

Name

Type

Default

xrefstyleCDATANone
endtermIDREFNone
typeCDATANone
linkendIDREFRequired

Description

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.

Processing expectations

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 should be repeated at the location of the Link and used as the “hot” text.

Linking elements must not be nested within other linking elements (including themselves). Because DocBook is harmonizing towards XML, this restriction cannot easily be enforced by the DTD. The processing of nested linking elements is undefined.

Future Changes

The InterfaceDefinition element will be discarded in DocBook V4.0. It will no longer be available in the content model of this element.

Parents

These elements contain link: abbrev, ackno, acronym, action, application, artpagenums, attribution, authorinitials, bibliocoverage, biblioid, bibliomisc, bibliorelation, bibliosource, bridgehead, citation, citebiblioid, citetitle, city, classsynopsisinfo, code, collabname, command, computeroutput, confdates, confnum, confsponsor, conftitle, contractnum, contractsponsor, contrib, corpauthor, corpcredit, corpname, country, database, date, edition, email, emphasis, entry, fax, figure, filename, firstname, firstterm, foreignphrase, funcparams, funcsynopsisinfo, function, glosssee, glossseealso, glossterm, hardware, holder, honorific, indexdiv, informalfigure, interfacename, invpartnumber, isbn, issn, issuenum, jobtitle, keycap, label, lineage, lineannotation, link, literal, literallayout, lotentry, manvolnum, member, modespec, msgaud, olink, option, optional, orgdiv, orgname, otheraddr, othername, pagenums, para, parameter, phone, phrase, pob, postcode, primary, primaryie, productname, productnumber, programlisting, property, pubdate, publishername, pubsnumber, quote, refentry, refentrytitle, refmiscinfo, refnamediv, refpurpose, releaseinfo, remark, replaceable, revnumber, revremark, screen, screeninfo, secondary, secondaryie, see, seealso, seealsoie, seeie, seg, segtitle, seriesvolnums, shortaffil, simpara, state, street, subscript, subtitle, superscript, surname, synopsis, systemitem, td, term, termdef, tertiary, tertiaryie, th, title, titleabbrev, tocback, tocentry, tocfront, trademark, ulink, userinput, volumenum, wordasword, year.

Attributes

endterm

Endterm points to the element whose content is to be used as the text of the link. If Endterm is supplied on a Link which has content, the value of Endterm should be ignored.

linkend

Linkend points to the target of the link.

type

Type is available for application-specific customization of the linking behavior.

See Also

anchor, olink, ulink, xref.

Examples

<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
          "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<sect1><title>Examples of <sgmltag>Link</sgmltag></title>

<para>
In this sentence <link linkend='nextsect'>this</link> word is
hot and points to the following section.
</para>

<para>
There is also a link to the section called
<quote><link linkend='nextsect' endterm="nextsect.title"/></quote>
in this sentence.
</para>

<sect2 id='nextsect'><title id='nextsect.title'>A Subsection</title>

<para>
This section only exists to be the target of a couple of links.
</para>

</sect2>
</sect1>