##### 3.2.2.2 taskbody

The <taskbody> element is the main body-level element inside a task topic. A task body is designed to contain information specific to completing a task, such as prerequisites, contextual information, and steps. DITA 1.2 introduces a much looser <taskbody> content model in order to allow for more variations in the structure of a task. A constraint module is also provided in order to maintain compatibility with the previous strict model; this constraint is used in the default task distributed by OASIS.

Beginning with DITA 1.2, there are two task models available in the DTD and Schema packages distributed by OASIS. One model, referred to as the general task, allows two additional elements inside the task body (<section> and <steps-informal>); it also allows multiple instances and orders for each element within <taskbody>. The second model, referred to as the strict task, maintains the order and cardinality of the DITA 1.0 and 1.1 taskbody. This strict task is implemented in the DTD and Schema with a constraint module.

Authors that use the default task DTD or Schema provided by OASIS will continue to see the strict task model when upgrading to DITA 1.2. Authors wishing to use the general task model will need to migrate their DITA 1.1 documents to reference the general task DTD or Schema.

DITA document type shells that include the task module as-is, or that specialize the <task> element without specializing <taskbody>, will also need to include the strict taskbody constraint module in order to maintain the order and cardinality of prior DITA versions.

Task specializations that specialize the <taskbody> element will not be affected by the new model, although they may be updated as needed to take advantage of the new elements.

###### Contains

Doctype | Content model
ditabase, task (strict) | ( (prereq) (optional) then (context) (optional) then (steps or steps-unordered) (optional) then (result) (optional) then (example) (optional) then (postreq) (optional) )
task (general), learningContent | ( ( (prereq) or (context) or (section) ) (any number) then ( (steps or steps-unordered or steps-informal) ) (optional) then (result) (optional) then (example) (any number) then (postreq) (any number) )
machineryTask | ( ( (prelreqs) or (context) or (section) ) (any number) then ( (steps or steps-unordered or steps-informal) ) (optional) then (result) (optional) then (example) (any number) then (closereqs) (optional) )

###### Contained by

Doctype | Content model
ditabase, task (strict), task (general), machineryTask, learningContent | task

###### Inheritance

- topic/body task/taskbody

###### Example

See 3.2.2.1 task.

###### Attributes

Name | Description | Data Type | Default Value | Required?
base | A generic attribute that has no specific purpose. It is intended to act as a base for specialized attributes that have a simple value syntax like the conditional processing attributes (one or more alphanumeric values separated by whitespace), but is not itself a filtering or flagging attribute. | CDATA | #IMPLIED | No
id-atts attribute group (id, conref, conrefend, conaction, conkeyref) | A set of related attributes, described in 3.4.1.4 id-atts attribute group |  |  |
localization-atts attribute group (translate, xml:lang, dir) | A set of related attributes, described in 3.4.1.6 localization-atts attribute group. |  |  |
global-atts attribute group (xtrf, xtrc) | A set of related attributes, described in 3.4.1.2 global-atts attribute group |  |  |
class, outputclass | Common attributes described in 3.4.1.9 Other common DITA attributes |  |  |

Previous Topic: 3.2.2.1 task

Next Topic: 3.2.2.3 prereq

Parent Topic: 3.2.2 Task elements

Sibling Topics:

3.2.2.1 task

3.2.2.3 prereq

3.2.2.4 context

3.2.2.5 steps

3.2.2.6 steps-informal

3.2.2.7 steps-unordered

3.2.2.8 step

3.2.2.9 stepsection

3.2.2.10 cmd

3.2.2.11 info

3.2.2.12 substeps

3.2.2.13 substep

3.2.2.14 stepxmp

3.2.2.15 choicetable

3.2.2.16 chhead

3.2.2.17 choptionhd

3.2.2.18 chdeschd

3.2.2.19 chrow

3.2.2.20 choption

3.2.2.21 chdesc

3.2.2.22 choices

3.2.2.23 choice

3.2.2.24 stepresult

3.2.2.25 tutorialinfo

3.2.2.26 result

3.2.2.27 postreq