dita-ot: Link to ID defined on topicref does not work (but should it?)

Let’s say in my DITA Map I define an ID on a topicref like:

<topicref href="tasks/gardenPreparation.dita" id="tid"/>

and then in one of my DITA topics I have a link like:

<xref href="../flowers.ditamap#tid" format="ditamap">LINK TEXT</xref>

But the link is broken in both the XHTML and PDF outputs. According to Eliot Kimber this should work.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 17 (11 by maintainers)

Most upvoted comments

I created a test case (https://github.com/dita-community/dita-test-cases/tree/master/topichead-linking) and the results I get with the 2.2.2 OT are that the HTML works mostly but the PDF is pretty broken.

In the HTML the ToC and generated child links are correct but the xrefs are not. That is, the required title-only topic behavior is used and is correctly reflected in the ToC but the xrefs to those topics do not reflect the navigation titles and do not point to the resulting HTML files.

In the PDF none of the links to topicheads work at all.

The 1.8.5 OT fails utterly to generate PDF and the HTML runs but reports errors trying to resolve the references to the topicheads.

So for PDF there is definitely a bug or bugs related to the handling of links to topicheads. The HTML seems to be (minimally) correct. The processor is free to treat references to topicheads that don’t specify @chunk in the same way it treats topicheads with @chunk but it should produce something useful in that case, which it currently does not.