Link to ID defined on topicref does not work (but should it?)
See original GitHub issueLet’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:
- Created 9 years ago
- Comments:17 (11 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub 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.
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.