Page 1 of 1

nav-toc=full generates unwanted markup, how to customize?

Posted: Mon Jun 24, 2019 12:51 pm
by d_croft
Hi,

I'm using the DITA-OT nav-toc=full parameter to include a navigation list to all topics of my map.

Some topics in the map are chunked maps, and with these topics, the markup for the toc entry looks like this:

Code: Select all

<li>
  <a href="../topic.html#topic">TOPIC</a>
  <ul></ul>
</li>
Here's the source DITA for the chunked map that results in this output:

Code: Select all

<map>
 <title>TOPIC</title>
 
 <ditavalref href="../ditaval/topic.ditaval"></ditavalref>
 
 <topicref href="../../user-guide/topic.dita" chunk="by-document select-document to-content">
  <topicref href="../reuse-topics/subtopic.dita" toc="no"></topicref>
 </topicref>
</map>
Is it possible to prevent DITA-OT from generating that empty <ul> element somehow?

Re: nav-toc=full generates unwanted markup, how to customize?

Posted: Mon Jun 24, 2019 1:17 pm
by d_croft
nav-toc=partial does not produce these empty <ul> elements. However, we would like to display the entire navigation on the page.

Re: nav-toc=full generates unwanted markup, how to customize?

Posted: Thu Jul 18, 2019 11:06 am
by Costin
Hi,

You could use the out-of-the-box DITA Map WebHelp Responsive transformation scenario (you can find it predefined in the scenarios list from the "Configure Transformation Scenario(s) window, available either from the toolbar, or from menu Document > Transformation").

The WebHelp Responsive output already includes a publication Table Of Contents, displayed in the left side of the publication content (see the WebHelp page layout HERE) and which could be suppressed when needed through a dedicated transformation scenario parameter (webhelp.show.publication.toc).
You could also set the granularity (which topics should be displayed in the publication toc), through yet another dedicated parameter (webhelp.publication.toc.links).
Details on the avaiable WebHelp Responsive scenario parameters also available in the User-Guide.

Regards,
Costin

Re: nav-toc=full generates unwanted markup, how to customize?

Posted: Mon Jul 29, 2019 12:17 pm
by d_croft
Hi,

using that transformation scenario is impractical because we use a custom DITA-OT plugin that's based on HTML5.

I'm just wondering whether or not this behavior is intentional or a bug in either Oxygen or DITA-OT? nav-toc=partial does not operate this way.

Re: nav-toc=full generates unwanted markup, how to customize?

Posted: Wed Jul 31, 2019 1:43 pm
by Costin
Hello,

This issue seems to be related either to the DITA-OT, which is a 3rd party open toolkit that oXygen uses, or to the DITA-OT plugin you are using.
There seems you are not using oXygen at all, so, as long as we do not develop the DITA-OT we can not help much with this.

I suggest you should either address questions regarding this on the DITA Users List (http://dita-archive.xml.org/dita-users), or report the issue you have to the DITA-OT (https://github.com/dita-ot/dita-ot/issues) or to your plugin developers.

Best Regards,
Costin