Wednesday, August 20, 2008

Which element to choose as the reusable DITA component

Writing a reusable component allows you to reuse a piece of text insets in your DITA document and reduces the cost for maintenance.

Reusable Candidates

The following are elements reuse candidates:

  • product name
  • installation paths
  • icon refrence
  • note(restrictions, prerequisites, tips)
  • individual steps

Element to Choose

The reusable component itself is a DITA XML file. It should follow the DITA vocabulary rules. In the reusable component file, you can choose most of the DITA elements to wrap the reusable text; however, which element makes the component most reusable?

  • For the semantically significant content, use the correct semantic elements, such as: filepath, varname, and cmdname
  • For the non-semantic strings, choose the least restrictive element type:ph

Syntax

Source:<element id=“element-ID”>content (including subordinate elements</element>
Reuse:<element conref=“source-file.dita#topic-ID/element-ID”></element>
For example:
Source:<ph id=“otk">DITA Open Toolkit</ph>
Reuse: <ph conref=“contentReuse.dita#conrefs/otk"></ph>


No comments: