Skip to Content
XSL-FO
book

XSL-FO

by Dave Pawson
August 2002
Intermediate to advanced
284 pages
8h 27m
English
O'Reilly Media, Inc.
Content preview from XSL-FO

Chapter 9. Cross-Document Links

To quote from the specification:

Because XML, unlike HTML, has no built-in semantics, there is no built-in notion of a hypertext link.

So why does XSL-FO address links? Certainly for a paper-based output, an active hyperlink isn’t much use, though for a screen-based presentation using PDF, it might be. While XSL-FO is used primarily for paper-based output today, it would be a mistake to think this is XSL-FO’s only purpose. XSL-FO is designed to present XML across several media, including interactive media; to do that, it needs to support hyperlinking. In its simplest form, the link is useful to cross-reference to content, locations within the document, and specific structural elements. For web-based delivery, it is handy to have an active link, and for print output, the actual content of the active element needs to be meaningful. This facility is offered in the first version of the specification.

XSL-FO has a formatting object named fo:basic-link, which provides the basic linking capability. Example 9-1 and Figure 9-1 show this in use.

Example 9-1. A basic link

xml source

<para>...see the figure on page <link idref="fig53"/> 
</para>

and the stylesheet
<xsl:template match="link">
<fo:basic-link background-color="lightblue"
    internal-destination="{@idref}">Page 
    <fo:page-number-citation ref-id="intro"/>
  </fo:basic-link>

</xsl:template>
A basic link

Figure 9-1. A basic link ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

XQuery, 2nd Edition

XQuery, 2nd Edition

Priscilla Walmsley
XSLT

XSLT

Doug Tidwell
Inside XSLT

Inside XSLT

Steven Holzner
Learning XSLT

Learning XSLT

Michael Fitzgerald

Publisher Resources

ISBN: 0596003552Errata Page