TocJS output path

The TocJS transform type was originally created as a plug-in distributed outside of the toolkit, but now ships bundled in the default packages. This XHTML based output type creates a JavaScript based frameset with TOC entries that expand and collapse.

A few Ant targets control most of the TocJS processing:

  • tocjsInit is used to set up default properties. This template detects whether builds have already set a name for the JavaScript control file; if not, the default name toctree.js is used.
  • map2tocjs calls dita.map.tocjs, which generates the contents frame for TocJS output.
  • tocjsDefaultOutput was added to the process in version 1.5.4 of the DITA-OT. If scripts are missing some required information, such as a name for the default frameset, this template will copy default style and control files. It also ensures that the XHTML process runs (earlier versions of TocJS created only the JavaScript control file by default).

Was this helpful?