Similar element names
DITA includes semantic elements that have almost identical names to others, such as keyword and kwd. These similar elements are intended to be used in different authoring scenarios.
DITA includes a keyword element, as well as a kwd element. It includes a var element, as well as a varname element.
The reason for this apparent duplication is that DITA base elements are
organised
into
domains of:
- programming
- software
- user interface
- typographical (or highlighting)
Different domains make it easier to identify elements relating to different types of documentation. In different documents, some similar concepts (such as keywords) have different semantic meanings. The differences between the apparently duplicated elements, according to the DITA Language Reference, are as follows.
Element | Domain | Meaning |
---|---|---|
var | Programming | Within a syntax diagram, the var element defines a variable for which the user must supply content, such as their user name or password. |
varname | Software | The varname element defines a variable that must be supplied to a software application. The variable name element is very similar to the var element, but variable name is used outside of syntax diagrams. |
kwd | Programming | The kwd element defines a keyword within a syntax diagram. A keyword must be typed or output, either by the user or application, exactly as specified in the syntax definition. |
keyword | No particular domain; is used in the body and prolog. | keyword represents a word or phrase with special significance in a particular domain. In the general case, keyword elements typically do not have any special semantics and processing associated with them, but can still be useful for organizing content for re-use or special processing. Topic description keywords are typically used for searching, retrieval and classification purposes. |