Table of Contents
This document covers basic questions about DocBook XML. More detailed information can be found in the resources listed in the section called “More Information” .
- Q: What is XML?
- Q: What is DocBook XML?
- Q: Why use DocBook XML?
- Q: How do I make a DOCTYPE declaration in DocBook XML?
- Q: What is the fundamental outline of a DocBook XML document?
- Q: How do I title my document in DocBook XML?
- Q: How do I create paragraphs and line breaks in DocBook XML?
- Q: How do I create a link in DocBook XML?
- Q: How do I bold and italicize text in DocBook XML?
- Q: How do I create a table of contents in DocBook XML?
- Q: How do I create an alt tag for my image in DocBook XML?
- Q: How do I insert an image using DocBook XML?
- Q: How do I create bulleted and numbered lists in DocBook XML?
Exstensible Markup Language (XML) is a structured language for organizing information. Through the use of tags and attributes, information can be layed out in such a way as to be readable by a computer. If you have used HTML, you already have a good grasp on the concept of tags and their use. It is important to note here that XML is less forgiving than HTML: one incorrect character in any tag will cause your document to be unreadable.
You may wish to read the W3C's [ http://www.w3.org/XML/1999/XML-in-10-points ] XML in 10 Points for an introduction to XML.
DocBook XML is a specific set of tags used to mark up documents. The tags and structure defined by DocBook make this a very useful format for marking up technical documentation.
By using DocBook XML, documents are marked up semantically, rather than visually. Used in conjunction with stylesheets, this gives us a great amount of flexibility in determining how documents are formatted and distributed to different audiences. In this way, we can accommodate a wide range of current, as well as future, devices and technologies.
DOCTYPE declarations are no longer necessary for using DocBook in the KMT. You can simply start your document with an
article tag.
Any Full Document (not including QA documents) that you create in the KMT will contain at minimum the following basic structural framework:
<article>
<section>
<title>Section Title</title>
<para>Section Text</para>
</section>
</article>
The title for your document is supplied through the KMT interface. It is not necessary to supply a title in your XML. In QA documents, the title you enter in the KMT becomes the question.
Hard line breaks cannot be created in running text as they can in, for instance, HTML. However, you can delimit paragraphs using
para tags. For example:
<para>First paragraph</para> <para>Second paragraph</para>
This depends on what type of link you would like to make. An explanation of how to create the different kinds of links in DocBook XML can be found in the [ http://help.unc.edu/?id=4765#links ] KMT Styleguide .
The
emphasis element renders text in italics. When used along with the
role="bold" attribute, the text is rendered as bold type. However, remember that DocBook should be used to mark up text for meaning, not for style. The
[ http://help.unc.edu/?id=4765#emphasis ]
KMT Styleguide provides an example of how to use the
emphasis element.
The KMT automatically generates the table of contents for you from the section titles in the document.
Alt tags,
required by law for all state web pages
, enable speech browsers used by the visually impaired to translate the content of images. To create an alt tag, use the
textobject and
phrase tags as shown in
[ http://help.unc.edu/?id=4765#example18 ]
this example .
Images are encapsulated by the
mediaobject element. The
imageobject and
imagedata tags add the image; the
textobject and
phrase tags add the alt attribute. A full example of how to add an image can be found
[ http://help.unc.edu/?id=4765#example18 ]
here .
The two elements used to create bulleted and numbered lists are
itemizedlist and
orderedlist , respectively. For both lists, a list item is created by using a
listitem tag. The text for each list item should be surrounded by
para tags. The example
[ http://help.unc.edu/?id=4765#example1 ]
here illustrates the use of both types of lists.
For more information about DocBook you may wish to visit the [ http://help.unc.edu/?id= ] [ http://www.docbook.org ] DocBook Homepage . For information about using DocBook in the KMT, please see the [ http://help.unc.edu/?id=4765 ] DocBook Styleguide .


