XML technologies / DITA / Creating and organizing topics / Task

(Excerpt from “DITA – Der neue Standard für Technische Dokumentation” by Johannes Hentrich)

Instructions telling users how to do something are among the most important information structures in technical documentation. They answer the question “How do I ...?”

Instructions provide an ideal information basis for a topic. A complete procedure delivers exactly one result: how to accomplish a task successfully. This perfectly meets the requirements of a self-contained topic.

DITA provides the task topic type (task). Its core is a list of individual action steps (steps), that is, a step-by-step procedure. The element <step> marks an individual step and specializes the element <li>, the list item element.

A task topic’s basic structure is:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//ELEMENTS DITATask//EN" "../dtd/task.dtd">
<task id="kapitel8_task">
    <title>Computer ausschalten</title>
    <taskbody>
        <steps>
            <step>
                <cmd>Klicken Sie auf START, um...</cmd>
            </step>
        </steps>
    </taskbody>
</task>

Like every DITA topic, a task topic begins with XML and DOCTYPE declarations. The DOCTYPE declaration references the file task.dtd, which in turn references the file task.mod, where the task topic’s elements are referenced.

The task topic type is identified by the root element <task>. The element <task> must receive a unique identifier, an ID.

The element <title> lets you assign the topic a title. The title should reflect the content of the topic as accurately as possible.

The element <taskbody> defines the task topic’s structure. In the example above, the element <taskbody> contains only one step.

A task topic can contain any number of steps (<step> elements), but only one action block, marked by the element <steps>. The elements <step> are numbered consecutively by the DITA Open Toolkit. If the individual steps should not be numbered, replace the element <steps> with the element <steps-unordered>.

The actual instruction, which the DITA language specification says should be written in direct speech, is marked by the element <cmd> (command). Incidentally, this is one of DITA’s few hints on how to phrase an element’s content.

The information in the task topic’s basic structure is hardly enough for users to perform an action successfully. DITA therefore offers numerous further elements for supplementary and more detailed procedural information:

<taskbody>
    <prereq>Um das FO-Plugin installieren zu können, benötigen Sie folgende Software...</prereq>
    <steps>
       ...
    </steps>
</taskbody>

<taskbody>
    <context>Wenn Sie das kleine Paket des DITA Open Toolkits installieren, benötigen Sie...</context>
</taskbody>

<step>
    <cmd>Wählen Sie eine Datenbank aus.</cmd>
    <choices>
        <choice>Wählen Sie „localhost“, wenn sich die Datenbank auf dem lokalen Server befindet.</choice>
        <choice>Wählen Sie 77.12.25.124, wenn sich die Datenbank nicht auf dem lokalen Server befindet.</choice>
    </choices>
</step>

<choicetable>
    <chhead>
        <choptionhd>Geben Sie %1 ein.</choptionhd>
        <chdeschd>Diese Defaulteinstellung speichert die Datei auf dem zentralen Server.</chdeschd>
    </chhead>
    <chrow>
        <choption>Geben Sie %2 ein.</choption>
        <chdesc>Die Datei wird auf dem Backup-Server gespeichert.</chdesc>
    </chrow>
    <chrow>
        <choption>Geben Sie %3 ein.</choption>
        <chdesc>Die Datei wird lokal gespeichert.</chdesc>
    </chrow>
</choicetable>

<taskbody>
    <steps>
        <step>
            <cmd>Geben Sie den Dateinamen ein.</cmd>
            <info>Der Dateiname darf keine Sonderzeichen enthalten.</info>
        </step>
    </steps>
</taskbody>

<steps>
    <step>
        <cmd>Geben Sie die Umgebungsvariable CLASSPATH ein.</cmd>
        <substeps>
            <substep>
                <cmd>Um eine Umgebungsvariable zu definieren, wählen Sie....</cmd>
            </substep>
        </substeps>
    </step>
</steps>

<taskbody>
    <steps>
        <step>
            <cmd>Speichern Sie den Datensatz ab.</cmd>
            <stepresult>Die Meldung „Datenbank wurde aktualisiert.“ wird angezeigt.</stepresult>
        </step>
    </steps>
</taskbody>

<taskbody>
    <steps>
        <step>
            <cmd>Geben Sie den Dateinamen ein.</cmd>
            <stepxmp>Ein gültiger Dateiname ist beispielweise einfuehrung.dita.</stepxmp>
        </step>
    </steps>
</taskbody>

<taskbody>
    <result>Nachdem Sie alle Daten erfolgreich eingegeben haben, wird die Meldung „Datenbank wurde erfolgreich aktualisiert.“ angezeigt.</result>
</taskbody>

<taskbody>
    <steps>
        <step>
            <cmd>Geben Sie Ihr Passwort ein.</cmd>
            <tutorialinfo>Das Passwort erhalten Sie von ihrem Seminarleiter.</tutorialinfo>
        </step>
    </steps>
</taskbody>

<taskbody>
    <steps>
        <step>
            .....
        </step>
    </steps>
    <postreq>Als nächstes muss ANT installiert werden.</postreq>
</taskbody>

  

 

 

 

back to top