DITA: Combining topics
As I recommended in DITA: Specializations (task, concept, reference)?, author in the base topic type. You won't find yourself doing acrobatics to combine topics. However, you may want to combine topics in order to create nested subheadings.
Combining topics with the chunk attribute
chunk="to-content" attribute allows you to merge child topics into a
parent topic in your navigation. You add the
chunk attribute on a
If you want the child topics to actually appear in the table of contents, use the "yes" value.
Although the chunk attribute works easily enough in the TOC area, it's problematic with linking. Chunking creates issues with relationship tables. (See DITA: Limitations with the chunk=”to-content” attribute in relationship tables.)
Combining topics by nesting elements
A better way to combine topics is by nesting elements. When you nest elements, you add
conbody elements inside each
other. Here's an example of how nest task elements.
With nesting concepts, here's what that looks like
Basically, just bookend the individual
concept elements inside one
concept element that functions as a container.
Using an outputclass for a third-level section
You can also "cheat" to
combine topics against the design of the DITA structure by crafting an
outputclass attribute to look like a third-level heading: like
p.level3 class to the webhelp stylesheet. Assuming your
OxygenXML install directory begins in your /Applications
folder, the path would be as follows:
Open the webhelp_topic.css file, scroll down to the bottom, and add something like this for your style:
This is more of a workaround hack than any good technique. Sometimes you just need a third-level heading, though, and this works.
About Tom Johnson
I'm a technical writer / API doc specialist based in the Seattle area. In this blog, I write about topics related to technical writing and communication — such as software documentation, API documentation, visual communication, information architecture, writing techniques, plain language, tech comm careers, and more. Check out my API documentation if you're looking for more info about that. If you're a technical writer and want to keep on top of the latest trends in the field, be sure to subscribe to email updates below. You can also learn more about me or contact me. Finally, note that the opinions I express on my blog are my own points of view, not that of my employer.