DITA

The Darwin Information Typing Architecture (DITA) is an XML architecture for authoring and, with the DITA Open Toolkit, publishing. It applies the principles of specialization and inheritance - comparable to Charles Darwin's concept of evolutionary adaptation, from which the name derives.

Each DITA topic is an XML file that can be reused across multiple publications. The generic Topic type contains a title element, a prolog element for metadata, and a body element. The body element contains paragraph, table, and list elements, much as in HTML. Three specialized topic types exist: Task, Concept, and Reference.

Extensive metadata elements and attributes can be included, both at the topic level and within individual elements. Conditional text allows content to be filtered or styled based on attributes such as audience, platform, and product. A .ditaval file identifies which attribute values are used for conditional processing.

A DITA map is a container for topics. Giving the topics a sequence and a structure, a map is used to transform a collection of content into a publication. A map can include relationship tables that define hyperlinks between topics, be nested, reference other topics or maps, and contain a variety of content types and metadata.

New elements and attributes can be added for specific industries and companies through the specialization of base DITA elements and attributes.

Worked Example

A minimal DITA publication combines a map (the table of contents), one or more topics, and, optionally, a .ditaval file for conditional filtering. The example below shows a map that references a single topic, a minimal "Hello world" topic, and a .ditaval file that includes content marked for the audience value "foo" and excludes content marked for "bar".

ch11-dita-map.xml:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map id="map" xml:lang="en">
  <topicref format="dita" href="sample.dita"
                navtitle="Sample" type="topic"/>
</map>

ch11-dita-topic.xml:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic xml:lang="en" id="sample">
  <title>Sample</title>
  <body>
    <p audience="foo">Hello world</p>
  </body>
</topic>

ch11-dita-val.xml:
<?xml version="1.0" encoding="UTF-8"?>
<val>
  <prop att="audience" val="foo" action="include"/>
  <prop att="audience" val="bar" action="exclude"/>
</val>