ASCIIDOC to PDF fop issue link issue

282 views Asked by At

I have some asciidoc source that I am converting to chunked HTML and PDF for documentation. The document contains external links, as follows:

ASCIIDOC source:

https://some-url-here.tld[Link Text]

Asciidoc is correctly generating the following XML representation:

<simpara>
  <ulink url="https://some-url-here.tld">Link Text</ulink>
</simpara>

xsltproc is translating this XML to .fo as follows:

<fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">
  <fo:basic-link external-destination="url(https://some-url-here.tld)">Link Text</fo:basic-link>
  <fo:inline hyphenate="false"> 
    [<fo:basic-link external-destination="url(https://https://some-url-here.tld)">https://https://some-url-here.tld</fo:basic-link>]
  </fo:inline>
</fo:block>

Which renders like this in the PDF:

Link Text [ https://some-url-here.tld ]

Rather than:

Link Text

which is a link to https://some-url-here.tld

I am using Asciidoc 8.6.9 with docbook 1.7.0 xsl stylesheets.

1

There are 1 answers

0
mzjn On BEST ANSWER

DocBook-XSL has a parameter called ulink.show, with a default value of 1 (true). If you change the parameter value to 0, you will get the wanted output.

Reference: http://docbook.sourceforge.net/release/xsl/current/doc/fo/ulink.show.html.

Btw, DocBook-XSL 1.70 is a rather old version, but the parameter is available.