O'Reilly logo

DocBook 5: The Definitive Guide by Richard L. Hamilton, Norman Walsh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

If You Change DocBook, It’s Not DocBook Anymore!

The license agreement under which DocBook is distributed gives you complete freedom to change, modify, reuse, and generally hack the schema in any way you want, except that you must not call your alterations DocBook.

Namespace and Version

Starting with DocBook V5.0, DocBook is identified by its namespace, http://docbook.org/ns/docbook. The particular version of DocBook to which an element conforms is identified by its version attribute. If the element does not specify a version, the version of the closest ancestor DocBook element that does specify a version is assumed. The version attribute is required on the root DocBook element.

Here is how these attributes would appear on the book element.

<book xmlns="http://docbook.org/ns/docbook"
      version="5.0">
  …
</book>

If you change the DocBook schema, the namespace remains the same, but you must provide an alternate version identifier for the schema and the modules you changed. The version attribute identifies the version of DocBook the alternate is based on, specifies what type of variant it is, and names the variant and any additional modules. While the format for the version string is not part of the normative specification, the DocBook Technical Committee recommends the following format:

base_version-(subset|extension|variant) (name[-version])+

For example, version 1.0 of Acme Corporation’s extension of DocBook V5.0 could be identified as 5.0-extension acme-1.0.

If your schema is a proper ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required