Open jomjohn opened 12 years ago
Verified that this still exists in 2.2.4, with the index parser in general (fails both for HTML Help and Eclipse).
I've updated the old hierarchy.ditamap
sample, adding terms into the first branch:
<topicref href="tasks/garagetaskoverview.xml" type="concept">
<topicmeta>
<keywords>
<indexterm>FUZZY</indexterm>
<indexterm>frizzy<index-see>FUZZY</index-see></indexterm>
</keywords>
</topicmeta>
<topicref href="tasks/changingtheoil.xml" type="task"/>
...
When I build that map to Eclipse, the log contains:
dita.out.map.eclipse.index:
[echo] args.eclipsehelp.indexsee = false
[pipeline] [DOTJ013E][ERROR] Failed to parse the referenced file 'hierarchy.ditamap'.
When I build HTML Help, the log contains:
dita.map.htmlhelp.hhk:
[pipeline] [DOTJ013E][ERROR] Failed to parse the referenced file 'hierarchy.ditamap'.
In both cases, if I remove the term with the nested <index-see>
, the build completes without error DOTJ013E.
At this point, with the bug report over 5 years old, I'm skeptical that support for <index-see>
or <index-see-also>
are going to be added to the older HTML Help and Eclipse output formats. I wonder if at this point it would be enough to ignore them, or possibly add support that doesn't have fancy formatting or attempt to link, rather than having good linking support for see/see-also.
I ran into this issue for PDF2/FOP while trying to index the DITA-OT docs, too.
Edit: Used DITA-OT 3.3.1.
I'm getting a new / different failure for Eclipse output now in 3.3.1 based on <index-see>
- but it comes from Eclipse specific code. I don't get the same error in HTML Help (which uses a lot of the same code); I don't think any of that code is used for PDF.
For Eclipse in 3.3.1, having exactly the same index-see
in two different topics causes the failure -- if two topics each contain this it will fail:
<indexterm>this<index-see>that</index-see></indexterm>
<indexterm>that</indexterm>
The failure in Eclipse comes from this line, though should probably be addressed earlier so that we never get here: https://github.com/dita-ot/dita-ot/blob/develop/src/main/plugins/org.dita.eclipsehelp/src/main/java/org/dita/dost/writer/EclipseIndexWriter.java#L233
When there are 2 identical index-see
, we go into a for-loop with a two item list. The list is updated at that line, replaced with a list of children (list size 0). But we continue with the original for-loop, trying to get the second item in the original list, and end up with an "index out of bounds exception" because we're trying to access the second item in a zero-item list.
I'm guessing this should be addressed earlier to ensure that we don't actually have two child items (with topic links) for the index-see
but I haven't worked out yet where to do that.
Here is what the error looks like:
The following instances result in the dita.out.map.htmlhelp.hhp target not parsing files:
Thanks for all of your help!
-Josh Johnson