question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Link to ID defined on topicref does not work (but should it?)

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:17 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
drmacrocommented, Mar 29, 2016

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.

0reactions
stale[bot]commented, Jun 4, 2021

This issue has been automatically marked as stale because it has not been updated recently. It will be closed soon if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Processing key references on topicref elements
Each key reference is resolved either to a resource addressed directly by URI reference in an @href attribute, or to no resource. Processors...
Read more >
%topicref-atts; - OASIS Open
The %topicref-atts; parameter entity represents a group of attributes used in numerous map elements: map, topicref, relcolspec, relcell, topichead, ...
Read more >
Authoring Step 11: Replace href with keyref on xref - DITA XML
The topicref specialization <keydef> is a convenience element configured to define keys. It sets @processing-role to "resource-only, "which indicates that the ...
Read more >
DITA map elements
A <topicref> element can reference a DITA topic, a DITA map, ... that is equivalent to a <topicref> element with a navigation title...
Read more >
DITA-OT error messages
Message ID Severity Message text DOTA013F Fatal Cannot find the specified DITAVAL ' %1 '. DOTJ012F Fatal Failed to parse the input file ' %1...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found