XML technologies / DocBook / Block elements / Admonitions
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
Use admonitions wherever you want to draw the reader’s attention to something. They are therefore formatted as a block and are often displayed with a graphic.
DocBook provides five different admonitions: caution, important, note, tip and warning. DocBook itself assigns no specific semantics, but some documentation defines them strictly, sometimes as required by legislation or standards such as ANSI Z536.6. Consider, for example, the strict product liability laws in the USA. For consistency and legal reasons, you should therefore carefully decide in advance what each element name means in your document. One possible definition of the admonitions is as follows:
-
tip(Suggestion) Tips offer suggestions to the reader, are not essential to the actual procedure, and can therefore safely be ignored.
-
note(Note) A general note drawing the reader’s attention to possible sources of error.
-
important(Important) An important note drawing the reader’s attention to hazards.
-
warning(Warning) A warning whose disregard results in harm or injury to a person.
-
caution(Danger, Caution) A warning whose disregard results in death.
You can, however, define a different “severity level”. If your documents involve no immediate risk of death (for example, if you are writing about toilet paper), a caution is certainly inappropriate. The following example shows what admonitions look like.
Example: Some possible admonitions
<tip>
<title>Verkürzen des Schreibaufwands bei leeren Elementen</title>
<para>Leere Elemente können Sie in XML auch als <tag class="emptytag">foo</tag> schreiben.</para>
</tip><warning>
<title>Hammer und Zeh vertragen sich nicht!</title>
<para>Wenn Sie einen Hammer auf den großen Zeh fallen lassen, erzeugt das große Schmerzen und Beschwerden. ...</para>
<para>Tragen Sie ausreichend gepolsterte Schuhe, um diese Art von Unfällen zu vermeiden.</para>
</warning>Almost any elements are allowed inside an admonition, except another admonition. As mentioned above, various standards, such as ANSI Z536.6, prescribe a specific structure:
A title identifying the hazard
What happens if someone disregards the warning
A solution to avoid the consequences
This principle has already been applied in the example above.
For more information about ANSI Z536.6, see Zehn Fragen zu ANSI Z536.6 (Ten Questions about ANSI Z536.6), tekom (Technische Kommunikation), issue 2/2007, ISSN: 1436-1809.
Copyright © 2009 Millin Verlag
You may print the online version for your private use.
Otherwise, this chapter from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Millin Verlag, Siebengebirgsring 36, 53797 Lohmar, info(at)millin.de
back to top