Links in XSL-FO

There are two types of links in XSL-FO: links to locations inside and outside documents. Both types are realized using <fo:basic-link> formatting object.The <fo:basic-link> allows cliccing on any containing area to get the destination resource.

An external link must have an URL specified in its external-destination attribute.

Here is a simple example. It illustrates how to use the <fo:basic-link> element to link to Altsoft's logo.

   <fo:external-graphic src="url('img/Altsoft logo.svg')"/>

For internal links everything is the same except for internal-destination attribute. URL specified in internal-destination should be defined in the same page using ref-id attributed and then referenced. Most of the time internal links are used for page-number-citation. See a simple example below:

<fo:basic-link internal-destination="Introduction">
Table of Contents
</fo:basic-link>
...
<fo:page-number-citation ref-id="Introduction"/>