Product SiteDocumentation Site

Chapter 5. XML Tools

5.1. XML Concepts
5.2. xmllint
5.3. xsltproc
5.4. xmltidy
This chapter will walk you through a few of the commonly-used XML tools that will make it easier to work with DocBook files.

5.1. XML Concepts

Extensible Markup Language or XML is the language that is used in Docbook. We use docbook to write all of the documentation, so it is a good idea to be familiar with XML terminiolgy and with resources to use in order to edit and check your XML.
XML is a markup language similar to HTML and SGML, the unique difference is that the tags <what-goes-in-brackets> can be specialized, as long as they are valid for the DTD (which in Fedora Docs is held by Docbook). Your best friend for tags, and how to use them will be found at the DocBook tag Reference.
Here is some information that will help you be able to talk about XML correctly so that if you need to ask a question you won't embarrass yourself.
  • XML has a tree like hirarchy where tags are nested. The outer most tag is the parent, and all the tags inside it are its respective children. If your text editor allows for nested tags, each child will be able to collapse inside the parent.
  • Once you look at a tag it may have several components:
    • <element> this is the tag name. It can be a parent or a child.
    • attribute - an attribute gives a special characteristic to an element. To see which elements take which attributes refer to the DocBook tag Reference
    • ="value" - attributes have values assigned to them. They can be numerical or they can be text strings. For valid attribute values, refer to the DocBook tag Reference.