Sunday, May 9, 2010

DITA 1.2 - New <task> elements

The DITA language specification v1.2 introduces two new task elements: <steps-informal> and <stepsection>.
The <steps-informal> element is for describing procedural information that is otherwise not normally described as a step. The <stepsection> is for giving explanatory information before a step. It is contained within the <steps> element and can be placed betweeen two <step> elements; the output of the content of a <stepsection> will not contain a bullet or a number.

When should I use the <steps-informal> and <stepsection> elements

<steps-informal>: The v1.2 language specifications haven't yet included an example of the <steps-informal> element so I am still a bit unclear about how and when to use it.
<stepsection>: If I am using DITA v1.1 and need to give some info before a step, the only way I could do that was insert an <info> in the previous step. With <stepsection>, this problem is resolved. Here's an example (taken from the v1.2 lang specs doc):
<steps>
  <step><cmd>Get out a bowl</cmd></step>
  <stepsection>The next two steps are very important!</stepsection>
  <step><cmd>Put on safety gloves</cmd></step>
  <step><cmd>Put on goggles</cmd></step>
  <step><cmd>Pour milk and cereal into the bowl</cmd></step>
</steps>

Related information

With v1.2, a <step> can have an <note> before the <cmd>.

  

Friday, May 7, 2010

DITA 1.2 - New <topic> elements

The DITA language specification v1.2 introduces two new topic elements: <bodydiv> and <sectiondiv>.
The <bodydiv> element is intended to be used as a grouping element for containing logical blocks of info that otherwise do not need either a title or a separate topic. It can be placed only within a <body> or within another <bodydiv>.
The <sectiondiv> element is similar to the <bodydiv> element except that it has more container elements - it can be placed within a <section>, <sectiondiv>, and a bunch of other tags depending upon the topic type.

Why and when should I use <bodydiv> and <sectiondiv>

If I want to reuse a whole group of info somewhere else, these two tags are handy. Not that such reuse couldn't have been done otherwise, but then, these tags can, for example, contain several <p> elements, some lists, some images...it's almost like being able to reuse an information chunk instead of individual tags. Without being actual formal topics, these tags behave like topics.

Related information

The <concept> topic type also has a new element in v1.2 that's similar to <bodydiv> and <sectiondiv>. It's called <conbodydiv>.

History of <topic> elements

Here's a list of the various topic elements from v 1.0 to 1.2:

DITA 1.0DITA 1.1DITA 1.2
dita--
topictopictopic
titletitletitle
titlealtstitlealtstitlealts
navtitlenavtitlenavtitle
searchtitlesearchtitlesearchtitle
-abstractabstract
shortdescshortdescshortdesc
bodybodybody
--bodydiv
sectionsectionsection
--sectiondiv
exampleexampleexample
related-linksrelated-linksrelated-links