<task>

The <task> element is the top-level element for a task topic. Tasks are the main building blocks for task-oriented user assistance. They generally provide step-by-step instructions that will enable a user to perform a task. A task answers the question of "how to?" by telling the user precisely what to do and the order in which to do it. Tasks have the same high-level structure as other topics, with a title, short description and body.

Note: Beginning with DITA 1.2, the DTD and Schema packages distributed by OASIS contain two task models. The general task model allows two additional elements inside the task body (<section> and <steps-informal>); it also allows multiple instances and varying order for the <prereq>, <context>, and <section> elements. The strict task model maintains the order and cardinality of the DITA 1.0 and 1.1 <taskbody> content model. This strict task is implemented with a constraint module.

See the taskbody description for additional details about the two models and for a description of impacts to DITA 1.1 documents.

Content models

See appendix for information about this element in OASIS document type shells.

Inheritance

- topic/topic task/task

Example

<task id="sqlj">
 <title>Creating an SQLJ file</title>
 <taskbody>
  <context>Once you have set up SQLJ, you need to create a new SQLJ file.
  </context>
  <steps>
   <step><cmd>Open...</cmd></step>
  </steps>
 </taskbody>
</task> 

Attributes

The following attributes are available on this element: Universal attribute group (with a narrowed definition of @id, given below), Architectural attribute group, and outputclass.

@id (REQUIRED)
An anchor point. This ID is usually required as part of the @href or @conref syntax when cross referencing or reusing content within the topic; it also enables <topicref> elements in DITA maps to optionally reference a specific topic within a DITA document. This attribute is defined with the XML Data Type ID.