DITA-fix-xbook-html-links - DITA cross-book links in HTML deliverables #HTML #linking

Chris Papademetrious

I have a basic publishing solution for DITA cross-book links in HTML-based outputs:


The solution consists of a DITA plugin (com.synopsys.preserve.keyrefs) that preserves additional scoped-key reference and definition information in the HTML output, along with a perl post-processing script (fix_html_xbook_links.pl) that modifies the HTML files in-place with resolved references.

My approach is to convert cross-book links to pseudo-URL references during preprocess:

<xref href="keyref://book.keyname">...</xref>

This does two things:

  • It allows the information to survive publishing.
  • It ensures that publishing formats the reference as a link instead of an unresolved-link text span.

I tested the solution with the default DITA-OT html5 and xhtml transformations, and with Oxygen's WebHelp transformation. There are some limitations, described in the Git repo page above.

I'm also hoping to develop a solution for PDFs, but that will be a much harder problem.

Feedback is welcomed!

 - Chris

Join main@dita-users.groups.io to automatically receive all group messages.