Open Ice-Maple opened 2 years ago
I remember that you make CHM publishing work decently in the DITA OT bundled with Oxygen XML Editor I edited the build file: dita-ot/plugins/org.dita.htmlhelp/build_dita2htmlhelp.xml and replaced preprocess2 with preprocess in the target's depends= attribute.
I remember that you make CHM publishing work decently in the DITA OT bundled with Oxygen XML Editor I edited the build file: dita-ot/plugins/org.dita.htmlhelp/build_dita2htmlhelp.xml and replaced preprocess2 with preprocess in the target's depends= attribute.
Thanks very much. The Problem is solved. We used to publish chm on a windows sever, not in the local. I've just copied the org.dita.htmlhelp from the oxygen editor to the server to overwrite the original plugins. And it works! Thus I hope the dita-ot can also fix the problem as what oxygen did.
I see this same bug in the HTML5 (with preprocess2) output and copy-to.
When I have a copy-to topicref such as:
<topicref href="topics/topic2.dita" copy-to="COPY_FILE.dita">
In the output TOC I get:
<li class="topicref"><a href="67e4b302638f9a737d3dc4ed35e1284a78f8974e.html">Topic-2</a></li>
When it should be:
<li class="topicref"><a href="COPY_FILE.html">Topic-2</a></li>
I believe this symptom has the same rooted issue as with https://github.com/dita-ot/dita-ot/issues/4042 and #3514
Expected Behavior
Topics with copy-to attribute are included in the ditamap. when using org.dita.htmlhelp to generate chm, those topics should display correctly.
Actual Behavior
chm is generated, but topics with copy-to attribute are not compiled. The log shows as below:
compile.HTML.Help: [exec] Microsoft HTML Help Compiler 4.74.8702 [exec] [exec] Compiling c:\Users\ADMINI~1\AppData\Local\Temp\2\temp202112151413596 02\temp_chm_dir\test.chm [exec] [exec] HHC5003: Error: Compilation failed while compiling 7db7550535317cc69 1175a975a0e8852d8aab7b0.html. [exec] HHC5003: Error: Compilation failed while compiling b4c4dd4207caaa0a0 8f9e10c812907b6fd04f883.html. [exec] [exec] [exec] The following files were not compiled: [exec] 7db7550535317cc691175a975a0e8852d8aab7b0.html [exec] b4c4dd4207caaa0a08f9e10c812907b6fd04f883.html [copy] Copying 1 file to C:\DITA\out\test\chm
I've checked the uncompiled topic in the chm, its property shows its href is test.chm::/b4c4dd4207caaa0a08f9e10c812907b6fd04f883.htmlPossible Solution
I rerun the task and halt the process to see the temp file. The test.hhc file in the temp_chm_dir displays as below: `
` Obviously, the vaule of the copy-to topics, were random IDs like b7d204e4b37413a10b2c58ba44f36ce606f47579, but other topics are display correctly like qs/test.html. I read the log, and found the dita topics are all renamed with random IDs. But they were finally renamed back when producing htmls, and uri in the hhc used their original names. So they are matched. However, the copy-to topics' uris are assigned to random IDs. Then I checked the map2hhcImpl.xsl and found copy-to topics were proccessed here. `