dita-ot icon indicating copy to clipboard operation
dita-ot copied to clipboard

Partial <nav> TOC is empty on topics that appear in reltable if it is defined at start of ditamap

Open vicmortelmans opened this issue 2 years ago • 1 comments

Expected Behavior

Using this command: dita.bat --nav-toc=partial --format=html5 --input=<my ditamap>

I expect each topic to contain a partial toc in <nav role="toc">

Actual Behavior

On some of the topics in html5 output, the <nav> element is empty: <nav role="toc"><ul></ul></nav>

So far, it seems to be occurring ONLY when ALL following conditions are met:

  1. nav-toc is set to partial (when set to full, all topics are OK)
  2. the topic appears in the <reltable> of the ditamap (the html files of the other topics are OK)
  3. the <reltable> is defined at the start of the ditamap (= before the <topicref> hierarchy; when I move it to the end, all topics are OK)

Possible Solution

Putting the <reltable> at the end of the ditamap is a workaround, but on a CMS with dozens of ditamaps and each translated to 20 languages or more, it's not an obvious one...

Copy of the error message, log file or stack trace

no relevant error messages

Environment

Reproduced on fresh download of dita-ot-3.6.1 on Windows 10

Steps to Reproduce

Here's the content of my ditamap. Not enough to reproduce, just to give an idea. If needed I can provide an export of the complete dataset via mail.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//IXIA//DTD IXIA DITA Map//EN" "../../system/dtd/ixia/IxiaMap.dtd">
<map id="amc1467110519170" title="Orthogon" xml:lang="en-us">
  <topicmeta>
    <othermeta content="0150A" name="documentnumber"/>
    <othermeta content="user_manual" name="documenttype"/>
  </topicmeta>
  <reltable>
    <relheader>
      <relcolspec linking="sourceonly"/>
      <relcolspec linking="targetonly"/>
    </relheader>
    <relrow xtrc="measurement scheme pane">
      <relcell>
        <topicref href="amc1467126223270.xml"/>
      </relcell>
      <relcell>
        <topicref href="amc1467110469310.xml"/>
        <topicref href="amc1467126204692.xml"/>
      </relcell>
    </relrow>
    <relrow xtrc="results pane">
      <relcell>
        <topicref href="amc1467126183876.xml"/>
      </relcell>
      <relcell>
        <topicref href="amc1467126204692.xml"/>
      </relcell>
    </relrow>
    <relrow xtrc="measure mode toolbar">
      <relcell>
        <topicref href="amc1467126217990.xml"/>
      </relcell>
      <relcell>
        <topicref href="amc1467110420931.xml"/>
        <topicref href="amc1467110471206.xml"/>
      </relcell>
    </relrow>
    <relrow xtrc="constraints">
      <relcell>
        <topicref href="amc1472828219592.xml"/>
      </relcell>
      <relcell>
        <topicref href="amc1472828406767.xml"/>
        <topicref href="amc1467110443626.xml"/>
      </relcell>
    </relrow>
  </reltable>
  <!--First column linking=sourceonly; second column linking=targetonly, via relcolspec settings.-->
  <topicref href="amc1467110758742.xml" keys="amc1467110758742"/>
  <topicref format="dita" href="axk1438117434726.xml" type="concept">
    <!--Scope of this manual-->
    <topicref format="dita" href="amc1467110872163.xml" type="concept"/>
    <topicref href="axk1438117672996.xml" keys="axk1438117672996"/>
    <topicref format="dita" href="axk1438117436008.xml" type="concept"/>
  </topicref>
  <topicref format="dita" href="axk1438117434351.xml" type="concept">
    <!--Intended Use-->
    <topicref href="amc1467126141158.xml" keys="amc1467126141158"/>
    <topicref format="dita" href="axk1438117437102.xml" type="concept"/>
    <!--Configuration-->
    <!--Operation Controls-->
    <topicref href="amc1473057276047.xml" keys="amc1473057276047"/>
    <topicref href="amc1467126219863.xml" keys="amc1467126219863">
      <topicref href="amc1467126224831.xml" keys="amc1467126224831">
        <topicref href="amc1467126204692.xml" keys="amc1467126204692"/>
        <topicref href="amc1467126223270.xml" keys="amc1467126223270"/>
        <topicref href="amc1467126183876.xml" keys="amc1467126183876"/>
        <topicref href="amc1467126167667.xml" keys="amc1467126167667">
          <topicref href="amc1467126217990.xml" keys="amc1467126217990"/>
          <topicref href="amc1467126175481.xml" keys="amc1467126175481"/>
        </topicref>
      </topicref>
    </topicref>
    <!--Messages-->
    <!--Labels-->
    <!--System Documentation-->
    <topicref href="amc1467126159035.xml" keys="amc1467126159035"/>
    <topicref href="amc1472828406767.xml" keys="amc1472828406767"/>
    <topicref href="amc1472827997312.xml" keys="amc1472827997312">
      <topicref href="amc1472828219592.xml" keys="amc1472828219592"/>
    </topicref>
    <topicref href="amc1472828551136.xml" keys="amc1472828551136"/>
  </topicref>
  <topicref href="amc1473057420363.xml" keys="amc1473057420363">
    <topicref href="amc1474984073644.xml" keys="amc1472804521795"/>
    <topicref href="amc1467110469310.xml" keys="amc1467110469310"/>
    <topicref href="amc1467110443626.xml" keys="amc1467110443626">
      <topicref href="amc1467110472441.xml" keys="amc1467110472441"/>
      <topicref href="amc1467110458438.xml" keys="amc1467110458438"/>
    </topicref>
    <topicref href="amc1467110420931.xml" keys="amc1467110420931">
      <topicref href="amc1467376790302.xml" keys="amc1467376790302"/>
      <topicref href="amc1467110471891.xml" keys="amc1467110471891"/>
    </topicref>
    <topicref href="amc1467110411005.xml" keys="amc1467110411005">
      <topicref href="amc1467110432834.xml" keys="amc1467110432834"/>
      <topicref href="amc1467110450967.xml" keys="amc1467110450967"/>
    </topicref>
    <topicref href="amc1467110497080.xml" keys="amc1467110497080">
      <topicref href="amc1467110480948.xml" keys="amc1467110480948"/>
      <topicref href="amc1467110492121.xml" keys="amc1467110492121"/>
    </topicref>
  </topicref>
  <topicref href="amc1467110471206.xml" keys="amc1467110471206">
    <topicref href="amc1467110423763.xml" keys="amc1467110423763"/>
    <topicref href="amc1467110490203.xml" keys="amc1467110490203"/>
    <topicref href="amc1467110438887.xml" keys="amc1467110438887"/>
    <topicref href="amc1467110430281.xml" keys="amc1467110430281"/>
    <topicref href="amc1467110449011.xml" keys="amc1467110449011"/>
    <topicref href="amc1467110446094.xml" keys="amc1467110446094"/>
    <topicref href="amc1467110486526.xml" keys="amc1467110486526"/>
    <topicref href="amc1467110495197.xml" keys="amc1467110495197"/>
    <topicref href="amc1467110427571.xml" keys="amc1467110427571"/>
    <topicref href="amc1467110483992.xml" keys="amc1467110483992"/>
    <topicref href="amc1467110436423.xml" keys="amc1467110436423"/>
    <topicref href="amc1467110461738.xml" keys="amc1467110461738"/>
    <topicref href="amc1467110477640.xml" keys="amc1467110477640"/>
    <topicref href="amc1467110496477.xml" keys="amc1467110496477"/>
    <topicref href="amc1467110498497.xml" keys="amc1467110498497"/>
    <topicref href="amc1467110478323.xml" keys="amc1467110478323"/>
    <topicref href="amc1467110474740.xml" keys="amc1467110474740"/>
    <topicref href="amc1467380578553.xml" keys="amc1467380578553"/>
    <topicref href="amc1467110454319.xml" keys="amc1467110454319"/>
    <topicref href="amc1467110452710.xml" keys="amc1467110452710"/>
  </topicref>
</map>

vicmortelmans avatar Oct 29 '21 10:10 vicmortelmans

Hi,

I just noticed another problem caused by having the <reltable> at the start of the ditamap: the topics that are listed somewhere in the <reltable> are missing in the PDF bookmarks (= the outline that you can see in a side pane in many PDF readers).

Not sure where these bookmarks are actually rendered. Is is done by DITA-OT transformations? Or is it the job of the PDF renderer (in my case: Antenna House)?

Keeps me wondering if having the <reltable> at the start of the ditamap is violating the dita specificiations? Or if it is really a bug in DITA-OT.

Best regards, Vic

vicmortelmans avatar Jan 27 '22 10:01 vicmortelmans