Why DITA, and how the types are built
DITA lets you define a new topic type as a stricter version of an existing one. The interface guide and the tutorial are built that way, so they get their own rules without leaving the standard.
Why DITA
A content model is only useful if something enforces it. In DITA, each topic type has a grammar, and every topic is checked against the grammar of its type, so an interface guide element without a label fails the build. Where the standard grammar is looser than the model, this site’s build adds a check: the DITA task grammar leaves steps optional, and the build fails a task without them. The model stops being a convention people remember and becomes a rule the tools apply.
DITA also separates content from output. The same topics become this website, and could become PDF or in-product help, without anyone rewriting them. And because DITA is an open standard, the source isn’t tied to one vendor’s tool.
What specialization is
Specialization defines a new element as a narrower version of an element that already exists. The new element can rename the old one, require parts the old one left optional, and leave out parts it allowed. It can’t add anything the old one couldn’t hold.
Every element records its ancestry in its @class attribute. The screen name in an
interface guide, for example, carries this value:
class="- topic/title reference/title interfaceGuide/screenName "
That line says a <screenName> is a kind of reference title, which is a kind of
topic title. A tool that has never heard of interface guides reads the ancestry, treats the element
as a title, and renders it as one. Mapping a specialized element back to its ancestor is called
generalization, and it’s why a specialized topic still works everywhere DITA works.
The interface guide is a specialized reference
An interface guide is reference material: facts about a screen, organized the way the screen is organized, for a reader to look up. So it specializes DITA’s reference type. The specialization names the parts (screen name, purpose, regions, elements) and makes the important ones required. Each element in a region is a specialized definition list entry, with a label followed by what it does, its default, what changes when you use it, and who can see or change it, always in that order. The Interface guide page lists the rules.
The tutorial is a specialized task
A tutorial could have been specialized from the generic topic type, but DITA’s task already has nearly everything a lesson needs: numbered steps, a command in each step, a place for the result of a step, and a place for the result of the whole procedure. Processors already know how to number and lay out those parts. Starting from task means the specialization only has to tighten the rules:
- The outcome (a specialized task context) is required and comes first.
- Every step must end with a visible result (a specialized step result), which task leaves optional.
- The closing summary of what the learner built (a specialized task result) is required.
- Optional parts of task that don’t belong in a lesson, such as choice tables and substeps, are left out.
Starting from the generic topic would have meant redefining steps from lists, and a processor that didn’t know the tutorial type would render it as plain lists instead of a procedure. The Tutorial page lists the rules.
Where the grammar lives
The two types are defined in DTD modules in a DITA Open Toolkit plugin, plugins/ca.watership.types. Each type has three files: an entity file, an element module, and a document type shell that puts the type together with the DITA 1.3 modules it builds on. A second plugin, plugins/ca.watership.html5, adds headings and labels to the HTML5 output. The Element reference for the specializations lists every element.

