Skip to main content

Search 400 pages — tools, formats, elements, namespaces, directory, comparisons, XPath, datatypes, glossary, parse errors, schema errors, use cases, guides, blog and product.

XML format

DocBook 5

A semantic vocabulary for technical books, articles, references, procedures, code listings, and cross-references.

DocBook describes what technical content means rather than how it looks. Books, chapters, sections, procedures, commands, parameters, and program listings can be transformed into HTML, PDF, EPUB, or help-system output.

DocBook 5 moved the vocabulary into a namespace and is commonly validated with RELAX NG. Older DocBook 4 documents are usually namespace-free, so the root namespace is the fastest version clue.

Constraints that bite

  • DocBook 5 elements belong to http://docbook.org/ns/docbook.
  • The vocabulary is semantic; presentation is supplied by a transformation or publishing toolchain.
  • Cross-reference targets use xml:id and must remain unique within the document.
  • DocBook 4 and 5 documents require different validation rules and migration handling.
Root element
<book>
Media type
application/docbook+xml
Extensions
.xml, .dbk
Namespaces
  • http://docbook.org/ns/docbook
XMLDir label
xml

Specification: DocBook 5.2 reference

A minimal valid document

Every example on this site is checked against the same parser the workspace uses, so what you see below is known to be well-formed.

docbook.xml
<?xml version="1.0" encoding="UTF-8"?>
<book xmlns="http://docbook.org/ns/docbook" version="5.2">
  <info><title>Deploying the catalog</title></info>
  <chapter xml:id="install">
    <title>Install</title>
    <para>Run <command>catalogctl setup</command>.</para>
  </chapter>
</book>

Get started

Bring order to the XML your team can't afford to ignore.

Create a free account and get a private workspace to search, validate, diff, and monitor your XML feeds, sitemaps, schemas, and vendor integrations.