link
Prev | DocBook Element Reference | Next

This is an alpha version of this book.

# 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|methodname|interfacename|exceptionname|
     ooclass|oointerface|ooexception|command|computeroutput|database|
     email|envar|errorcode|errorname|errortype|filename|function|
     guibutton|guiicon|guilabel|guimenu|guimenuitem|guisubmenu|
     hardware|interface|keycap|keycode|keycombo|keysym|literal|
     constant|markup|medialabel|menuchoice|mousebutton|option|
     optional|parameter|prompt|property|replaceable|returnvalue|
     sgmltag|structfield|structname|symbol|systemitem|token|type|
     userinput|varname|nonterminal|anchor|author|authorinitials|
     corpauthor|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
type | CDATA | None
linkend | IDREF | Required
endterm | IDREF | None

### Parameter Entities

The following parameter entities contain link:

Parameter Entities
`%cptr.char.mix;` | `%docinfo.char.mix;` | `%indexdivcomponent.mix;`
`%link.char.class;` | `%ndxterm.char.mix;` | `%para.char.mix;`
`%refinline.char.mix;` | `%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.

### 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`, `application`, `artpagenums`, `attribution`, `authorinitials`, `bibliomisc`, `bridgehead`, `citation`, `citetitle`, `city`, `classsynopsisinfo`, `collabname`, `command`, `computeroutput`, `confdates`, `confnum`, `confsponsor`, `conftitle`, `contractnum`, `contractsponsor`, `contrib`, `corpauthor`, `corpname`, `country`, `date`, `edition`, `email`, `emphasis`, `entry`, `fax`, `figure`, `firstname`, `firstterm`, `foreignphrase`, `funcparams`, `funcsynopsisinfo`, `function`, `glosssee`, `glossseealso`, `glossterm`, `holder`, `honorific`, `indexdiv`, `informalfigure`, `invpartnumber`, `isbn`, `issn`, `issuenum`, `jobtitle`, `label`, `lineage`, `lineannotation`, `link`, `literal`, `literallayout`, `lotentry`, `manvolnum`, `member`, `modespec`, `msgaud`, `olink`, `optional`, `orgdiv`, `orgname`, `otheraddr`, `othername`, `pagenums`, `para`, `phone`, `phrase`, `pob`, `postcode`, `primary`, `primaryie`, `productname`, `productnumber`, `programlisting`, `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`, `term`, `tertiary`, `tertiaryie`, `title`, `titleabbrev`, `tocback`, `tocentry`, `tocfront`, `trademark`, `ulink`, `userinput`, `volumenum`, `wordasword`, `year`.

### Children

The following elements occur in link: `abbrev`, `acronym`, `action`, `anchor`, `application`, `author`, `authorinitials`, `beginpage`, `citation`, `citerefentry`, `citetitle`, `classname`, `classsynopsis`, `cmdsynopsis`, `command`, `computeroutput`, `constant`, `constructorsynopsis`, `corpauthor`, `database`, `destructorsynopsis`, `email`, `emphasis`, `envar`, `errorcode`, `errorname`, `errortype`, `exceptionname`, `fieldsynopsis`, `filename`, `firstterm`, `footnote`, `footnoteref`, `foreignphrase`, `funcsynopsis`, `function`, `glossterm`, `guibutton`, `guiicon`, `guilabel`, `guimenu`, `guimenuitem`, `guisubmenu`, `hardware`, `indexterm`, `inlineequation`, `inlinegraphic`, `inlinemediaobject`, `interface`, `interfacename`, `keycap`, `keycode`, `keycombo`, `keysym`, `link`, `literal`, `markup`, `medialabel`, `menuchoice`, `methodname`, `methodsynopsis`, `modespec`, `mousebutton`, `nonterminal`, `olink`, `ooclass`, `ooexception`, `oointerface`, `option`, `optional`, `othercredit`, `parameter`, `phrase`, `productname`, `productnumber`, `prompt`, `property`, `quote`, `remark`, `replaceable`, `returnvalue`, `revhistory`, `sgmltag`, `structfield`, `structname`, `subscript`, `superscript`, `symbol`, `synopsis`, `systemitem`, `token`, `trademark`, `type`, `ulink`, `userinput`, `varname`, `wordasword`, `xref`.

## 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>

Prev | Home | Next
lineannotation | Up | listitem

Copyright © 1999, 2000, 2001 O'Reilly & Associates, Inc.