Reltable: Keyref to Topic in Other Keyscope Resolves to Wrong Instance of Linked Topic
See original GitHub issueCreating this issue in response to this comment by @raducoravu.
Expected Behavior
I’ve got two submaps, both of which reference a unique concept and the topic t_topic.dita with a key defined in a separate keydefTopic.ditamap. Both submaps also have a ditaval to filter the content of t_topic.dita. Both submaps have their own keyscope. The navigational topicref in each submap is also assigned a unique key, as in <topicref keys="uniqueKey" keyref="previouslyDefinedKey"/>
.
The unique key is then used in a reltable (in map one) to create links between the concept of map one and the specific instance of t_topic.dita from map two. The topicref for the specific instance from map two uses the keyscope and the unique key, as in <topicref keyref="map2.uniqueKey"/>
.
I expect the concept from map one to be linked to the map two-instance of t_topic.dita and vice versa.
Actual Behavior
DITA-OT 3.5.2: The concept from map one is linked to the map one-instance of t_topic.dita instead of the expected instance from map two. I get no output from DITA-OT 3.4.1.
I used @jelovirt’s fix of mapreflmpl.xsl for both DOT-versions.
Steps to Reproduce
I’m attaching a small sample project to reproduce the problem. I also included logfiles for the html5-transformation with DITA-OT 3.4.1 as well as with DITA-OT 3.5.2:
20200824_githubSample.zip
Environment
- DITA-OT version: 3.4.1 and 3.5.2
- Operating system and version: Windows
- How did you run DITA-OT?
dita
command - Transformation type: HTML5
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (6 by maintainers)
Top GitHub Comments
Yes, this is a bug. I do not disagree with this. Actually I was looking over this right now, but have not yet found the cause or a possible solution for it.
I’m attaching a proposed fix in the java code, based on the latest 3.5.4 changes. It seems to work in this case and it did not seem to break any of our automated tests but I’m not 100% sure it’s the best possible fix for this problem. KeyrefReader.java.zip
@edLearns if this issue is not fixed in the DITA OT you can drop me an email and I can offer you a late night build of the Oxygen publishing engine which is the DITA OT plus some commercial plugins and some patches.