Product SiteDocumentation Site

Chapter 8. XML Tags

It's not always logical which tag to use for something. I'm trying to help. You may disagree with some of the following, so feel free to ask about it and get it changed to something sensible. This is my thinking out loud and somewhere to keep things. It's not gospel or a rule book.
As always, refer to the docbook site for notes, other attributes and usage instructions. http://www.docbook.org/tdg/en/html/docbook.html
<citetitle>
Use citetitle when referring to an external book.
<cmdsynopsis>
This is a wrapper. Refer to the docbook website for how to use this. Essentially it's used for documenting the syntax of commands (rather than actual examples), and listing the various possible arguments, their class, etc.
<command>
commands
  • (e.g.) ls, top, find, mount, bash
  • Other cases as well may require the use of this tag if nothing better presents itself.
  • Don't use this tag for things like filenames, directories, etc.
  • Note the use of this tag for /bin/bash - don't use <application> in this case. This is used for larger software packages, e.g., Inkscape, acroread.
<filename>
files and directories
  • Use <package> where appropriate, however.
<guilabel>
GUI objects
  • Apart from traditional usage as described in the ?DocBook Guide, use this for dialog boxes, screens, and windows that appear on-screen as well.
  • Do not use <interface>; as of ?DocBook v3.0 it is obsolete.
<literal>
Attribute values
  • Values of attributes, etc. For example, the nsslapd-accesslog-level attribute can have values of 0, 4, 256, and beyond. I used <literal> tags for these values.
  • <option> is a possibility as well, if you think about attributes/parameters being on or off. If you find a better one, please let me know.
<option>
command options, etc.
  • On occasion you might need to list a number of options for a command or something similar. These should be tagged as options, not commands.
  • Note that this is not used for actual command examples. Do not create an example such as "ps aux | grep bash" and tag the individual components. Tag the entire command as <command>. See also <cmdsynopsis>
  • This tag does not mean "optional"
<parameter>
Parameters of any kind
  • Use <parameter> for attributes, (as distinct from object classes, for which I used <classname>).
  • Also for command arguments, where (for example) you need to list and describe command arguments. I haven't found anything better yet.
  • I also used <parameter class="option"> for allow and deny permissions/privileges.
  • <parameter role="entry">cn=kerberos</parameter>
<programlisting>
Use this for code samples (anything that is typed into a text editor) ... and then use <screen> for the output.
<property>
I started using this when referring to (e.g.,) Group Name, GID, and UID of users in the IPA documentation.
<returnvalue>
Fairly obvious I guess, but I've seen it marked up as various other things. It just refers to the value returned by a function or something similar, with typical values being 0 (zero) or -1, etc.
<screen>
For anything that is shown on a screen ... usually output from a command. Do not use for code samples.
<systemitem>
This tag supports a range of classes that can be used for various things, such as protocols, resources, and user account names. Also use for less easily-definable objects, such as PAM and kernel modules, with 'role="module"'.
  • Example: <systemitem class="username">root</systemitem>
  • Example: <systemitem class="server">europe.example.com</systemitem>
  • Example: <systemitem role="module">pam_mkhomedir</systemitem>
  • Example: <systemitem class="resource" nfs/<FQDN></systemitem>
Note:
  • These examples are context dependent. In a different case, the "server" class might be "domainname".
  • For services (e.g., httpd, etc.), use class="service" rather than class="daemon". Trying to determine when to use one rather than the other in doc at present doesn't appear to be worth the effort...
<type>
Data types for parameters