Messages displayed in a user interface
DITA has four elements for marking up system messages, error messages, and other output from a computer system, or equipment user interface.
Whether it is through a software application, a machine instrument panel, or a consumer electronic device display, information is commonly displayed to the user through some sort of user interface. In some cases the information takes the form of lights, gauges, and dials, in other cases the information is audible, and in other cases it is textual or graphical. When describing these messages from the equipment in DITA, a number of semantic elements are used.
- msgph
- A short textual message displayed on a screen, as a sound, or on a printout. This element is used when the message will be described or quoted within an existing paragraph or block element.
- msgblock
- A long, multi-line textual message displayed on a screen, as a sound, or on a printout. This element is used when the message will be described or quoted in its own block element (or paragraph).
- msgnum
- The identification number of a message, such as an error message, usually displayed on a screen or instrument panel, or on a printout.
- systemoutput
- The response from a system to user input of some kind. This element is part of the DITA software domain.
Error messages are usually made up of a msgnum element (the error code) and a msgph or msgblock element. Likewise, status messages are best described with msgph or msgblock. The result displayed on a calculator after a user has entered an equation is best described with a systemoutput element.
The distinction between a message and system output is that the message
is something produced by the system or device as part of its function, while a
system output is something that the system returns as a direct result of
something that the user inputs. Another way of putting it is that the
systemoutput is used in conjunction with
userinput to describe a
conversation
between the user and the system.