Search the Catalog
DocBook: The Definitive Guide

DocBook: The Definitive Guide

By Norman Walsh & Leonard Muellner
1st Edition October 1999
1-56592-580-7, Order Number: 5807
652 pages, $36.95 , Includes CD-ROM

Link

Name

Link -- A hypertext link

Synopsis

Mixed Content Model

Link ::=
((#PCDATA|FootnoteRef|XRef|Abbrev|Acronym|Citation|CiteRefEntry|
  CiteTitle|Emphasis|FirstTerm|ForeignPhrase|GlossTerm|Footnote|
  Phrase|Quote|Trademark|WordAsWord|Link|OLink|ULink|Action|
  Application|ClassName|Command|ComputerOutput|Database|Email|
  EnVar|ErrorCode|ErrorName|ErrorType|Filename|Function|GUIButton|
  GUIIcon|GUILabel|GUIMenu|GUIMenuItem|GUISubmenu|Hardware|
  Interface|InterfaceDefinition|KeyCap|KeyCode|KeyCombo|KeySym|
  Literal|Constant|Markup|MediaLabel|MenuChoice|MouseButton|
  MsgText|Option|Optional|Parameter|Prompt|Property|Replaceable|
  ReturnValue|SGMLTag|StructField|StructName|Symbol|SystemItem|
  Token|Type|UserInput|VarName|Anchor|Author|AuthorInitials|
  CorpAuthor|ModeSpec|OtherCredit|ProductName|ProductNumber|
  RevHistory|Comment|Subscript|Superscript|InlineGraphic|
  InlineMediaObject|InlineEquation|Synopsis|CmdSynopsis|
  FuncSynopsis|IndexTerm)+)

Attributes

Common attributes

Name

Type

Default

TypeCDATANone
LinkendIDREFRequired
EndtermIDREFNone

Tag Minimization

Both the start- and end-tags are required for this element.

Parameter Entities

%cptr.char.mix;%docinfo.char.mix;%indexdivcomponent.mix;
%link.char.class;%ndxterm.char.mix;%para.char.mix;
%programlisting.content;%refinline.char.mix;%screen.content;
%tbl.entry.mdl;%title.char.mix;%word.char.mix;

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 specifies an EndTerm, and 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 instead of the Link content, which should be suppressed.

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.

(4.0) 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.

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 V3.1//EN">
<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"></link></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>

Back to: DocBook: The Definitive Guide


oreilly.com Home | O'Reilly Bookstores | How to Order | O'Reilly Contacts
International | About O'Reilly | Affiliated Companies | Privacy Policy

© 2001, O'Reilly & Associates, Inc.