Hi Nick,

Thanks very much for your help.

Following your suggestion does the trick:

<currentDocid>book</currentDocid>

As a result, the link gets resolved as an internal-destination in the .fo, and 
this works fine in the PDF.

<fo:basic-link internal-destination="chapter"><fo:inline>link to the next 
chapter</fo:inline></fo:basic-link>.

Regards,
Mark

On Oct 23, 2013, at 2:35 PM, Wood Nick wrote:

> Mark,
>  
> I do not pretend to be an expert on this – I setup my pdf olinks using Bob’s 
> excellent book plus some guidance you have posted in the past.  However, have 
> you tried adding <currentDocid/> in the <configuration/> of your POM and then 
> using the sitemap in your olinkdb.xml (as I believe this provide the location 
> of the documents).
>  
> Regards
>  
> Nick
>  
>  
> From: Mark Craig [mailto:[email protected]] 
> Sent: Wednesday, October 23, 2013 10:11 AM
> To: DocBook Apps
> Subject: [docbook-apps] Olinks in PDF missing valid destination?
>  
> Hello,
>  
> In the past I have successfully set up Olink resolution for HTML.
>  
> I have read and tried to implement
> http://www.sagehill.net/docbookxsl/OlinkPrintOutput.html#PdfLinkingSetup
> But I'm not managing to do the same for PDF.
>  
> A clickable link of the Olink is there in the PDF, but with no valid 
> destination.
>  
> This is with docbkx-tools 2.0.14, so DocBook XSL 1.76.1 and FOP 1 (I think 
> 1.1).
>  
> My little test is at https://github.com/markcraig/DOCS-47.
> (There's only one Olink, in the para at line 20 of book.xml.)
>  
> The main part of the target database document for the test is minimal:
>  
> <?xml version='1.0' encoding='utf-8'?>
> <!DOCTYPE targetset[
> …
> <!ENTITY book SYSTEM '../../target/target.db'>
> ]>
> <targetset>
>  <document targetdoc="book" baseuri="book.pdf">&book;</document>
> </targetset>
>  
> Although Olink debug messages make it look like the stylesheets are finding a 
> match for the link, the .fo is missing information.
>  
> In the build output, I see:
>  
> Olink debug: cases for targetdoc='book' and targetptr='chapter' in language 
> ''.
> Olink debug: CaseA matched.
> Olink debug: CaseA key is the final selection: book/chapter/
>  
> But the .fo has an external-destination with no actual destination:
>  
> <fo:basic-link show-destination="replace" external-destination="url(#dest=)"
> ><fo:inline>link to the next chapter</fo:inline></fo:basic-link>
>  
> If I remove the baseuri value from the <document> element in the target 
> database document, then the external-destination attribute changes a little:
>  
> <fo:basic-link show-destination="replace" 
> external-destination="url(#dest=chapter)"
> ><fo:inline>link to the next chapter</fo:inline></fo:basic-link>
>  
> What should I do differently for a valid destination to be generated?
>  
> Thanks for your advice.
> Regards,
> Mark

Reply via email to