Next / Previous / Contents / Shipman's homepage

5.2. Structure of the input file

The DocBook 5.0 schema's elements are in this namespace:

Certain standard elements such as xml:id are in this namespace:

The primary input to this program is the title element for the entire work, and the title elements in all sections. Sections may appear as section, sect1, sect2, or sect3 elements.

In each case, the title element is wrapped in an info element. If we ignore the namespace qualifiers, here are some examples of XPath expressions describing places where a title element might occur:


We'll also render the elements described in Section 5.4, “The report format”, such as code and application.

As parsed by lxml, each element and attribute name actually appears as “{nsuri}local”, where nsuri is the namespace URI (NSURI) and local is the local element name. For example, the .tag attribute of the article node will actually be:


Because id is a universal XML attribute, it is in the XML namespace, so its .tag will be:


Navigating within the XML tree in the presence of namespace qualifiers requires additional techniques.