A link is an object in the output that can be activated by the user to show a different part of the document or an external resource. They are sometimes called “hyperlinks”.

A link requires:

  • a piece of content that will be used to create a link in the output (for example, a phrase or image), and

  • a target that is shown when the link is activated.

A link is created by assigning the value of an attribute to the Link to Target using attribute mapping property. If there is no suitable attribute in the source data, you can use the value of a custom marker attribute to assign the link target.

A target can be defined in two ways:

  • Use the Set Target ID from attribute property to create a target that points to the element that triggered the mapping. The values in the attributes for the link and target elements must match.

  • Certain values of the link attribute define an existing target. For example, a link value beginning with “http://” indicates that the target can be found by interpreting the attribute value as a Uniform Resource Identifier.

The composition engine does not attempt to check that links are valid. Links are implemented as part of the output creation. When creating a PDF you can set values in the PDF profile to indicate how invalid links should be processed.

Link content

In some cases all or part of the content for a link can be generated by the stylesheet. For example, you may wish to add the page number of the link target.

The Xref file described in “Cross referencing” can be used to generate this type of content.