4. Hyperlinks (link, anchor)

4.1. Purpose

Provide constructs to enable linking to internal elements and external documents.

4.2. Elements

tag
attributes
anchor
id - name of anchor
link
href - anchor id or external document or site
section[1-4]
id - defines anchor for section

Note that doc.dtd in addition allows internal links to references in the <back> section. See the doc.dtd authoring document.

4.3. Example

4.3.1. Construct

238: <para> 239: <anchor id="myanchor" /> 240: Here I define an anchor: 241: </para> 242: <para> 243: External link to <link href="http://www.justobjects.nl">www.justobjects</link> 244: </para> 245: <para> 246: External link to <link href="overview.html">overview.html</link> 247: </para> 248: <para> 249: Internal link to <link href="authoring-text-s4.html#myanchor">myanchor</link> 250: </para> 251: <para> 252: Internal link to the beginning of this section with id <link href="authoring-text-s4.html#text.link">text.link</link>. 253: </para> 254: <para> 255: In the last example the section id attribute was used where the section element was 256: defined as follows: 257: 258: </para> 259: <as-is> 260: &lt;section2 id="text.link" title="link and anchor - using hyperlinks" &gt; 261: </as-is>

4.3.2. Result

Here I define an anchor:

External link to www.justobjects

External link to overview.html

Internal link to myanchor

Internal link to the beginning of this section with id text.link.

In the last example the section id attribute was used where the section element was defined as follows:

      <section2 id="text.link" title="link and anchor - using hyperlinks" >