Why won't my docbook links work when linking to something earlier in the document?

70 views Asked by At

I'm going from docbook to fo to pdf and I need to have text that goes to different parts of the document when clicked. I'm using the following format

<link linkend="M1350424Trace">
  <emphasis role="bold">Link To Trace</emphasis>
</link>

Where M1350424Trace is the id of a paragraph. It works how I want it to work when I'm linking to something that comes later in the document but not when it's trying to link to something that comes earlier. Why is that?

Here's the .fo

<fo:basic-link internal-destination="M1350424Trace">
  <fo:inline>
    <fo:inline font-weight="bold">Link To Trace</fo:inline>
  </fo:inline>
</fo:basic-link>
1

There are 1 answers

0
Eduard Tibet On

I've reproduced your case with the following input data:

  • Sample DocBook file with link and xref as a linkage mechanism
  • link and xref both and the target id are on different pages after rendering.
  • DocBook 5.1 as a source.
  • DocBook XSL 1.79.1 - as a stylesheets.
  • FOP 2.3 as a renderer.

The produced PDF file was tested with xpdf 3.04, Acrobat Reader 7.08 on Linux Debian 9.5

Works as should be: pressing the link moves to the page with a required element (para) with a required id number.

So you need to provide the exact file and exact configuration that raised this strange behavior. You can fill it with a dump data in case your document is under NDA or contains sensitive information, BUT it should be the same in matter of structure and elements within as an original one.

I'll try to reproduce your case.