Task topics answer "How do I?" questions, and have a well-defined structure that describes how to complete a procedure to accomplish a specific goal.

Why tasks?

Tasks are the essential building blocks for providing procedure information. A task topic answers the "How do I?" question by providing precise step-by-step instructions detailing what to do and the order in which to do it. The task topic includes sections for describing the context, prerequisites, expected results, and other aspects of a task.

Task structure

The <task> element is the top-level element for a task topic. Every task topic contains a <title> and a <taskbody> and optional <titlealts>, <shortdesc>, <prolog>, and <related-links>.

The <taskbody> element is the main body-level element inside a task topic. A task body has a very specific structure, with the following elements in this order: <prereq>, <context>, <steps>, <result, <example> and <postreq>. Each of the body sections is optional.

Describes information needed before starting the current task.
Provides background information for the task. This information helps the user understand what the purpose of the task is and what they will gain by completing the task. This section should be brief and does not replace or recreate a concept topic on the same subject, although the context section may include some conceptual information.
Provides the main content of the task topic. A task consists of a series of steps that accomplish the task. The <steps> section must have one or more <step> elements, which provide the specifics about each step in in the task.

The <step> element represents an action that a user must follow to accomplish a task. Each step in a task must contain a command <cmd> element which describes the particular action the user must do to accomplish the overall task. The step element can also contain information <info>, substeps <substeps>, tutorial information <tutorialinfo>, a step example <stepxmp>, choices <choices> or a stepresult <stepresult>, although these are optional.

Describes the expected outcome for the task as a whole.
Provides an example that illustrates or supports the task.
Describes steps or tasks that the user should do after the successful completion of the current task. It is often supported by links to the next task or tasks in the <related-links> section.
Here’s an example of a task topic.
<task id="ertx">
 <title>Creating an ERTX file</title>
  <context>Each morning before breakfast you need to 
create a fresh ERTX file.</context>
   <step><cmd>Start ERTX.</cmd></step></steps>
   <step><cmd>Click New ERTX File.</cmd></step></steps>
  <result>You now have your ERTX file for today!</result>


OASIS DITA Architectural Specification v1.0 -- 09 May 2005
Copyright (c) OASIS Open 2005. All Rights Reserved.