XML technologies / DocBook / Getting started with DocBook / Differences between DocBook 4 and 5

(Excerpt from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" by Thomas Schraitle)

This section explains the differences, partly adapted and expanded from The DocBook Schema Version 5.0, between the older and newer DocBook versions. It can be skipped if unnecessary. For details about elements and content models, see The Definitive Guide (replace the placeholder ELEMENT with the desired element name):

DocBook 4:

"http://www.docbook.org/tdg/en/html/ELEMENT.html"

DocBook 5:

"http://www.docbook.org/tdg5/en/html/ELEMENT.html"

Differences between DocBook 4 and 5

DocBook 5 now has a namespace

DocBook 5 elements belong to the namespace "http://docbook.org/ns/docbook". Almost all current XML applications have their own namespace, making schemas easier to combine without element-name collisions.

Removing legacy features

Some elements were removed and replaced with simpler or more versatile alternatives.

 

Table: Element changes

Element(s)

The following table briefly compares the two official DocBook versions:

 

Table: Comparing DocBook 4 and DocBook 5

Topic

DocBook 4

DocBook 5

Official schema

DTD

RELAX NG/Schematron

Other unofficial schemas

RELAX NG, W3C Schema

DTD, W3C Schema

Documentation

http://www.docbook.org/tdg/en/html/document.html

http://www.docbook.org/tdg5/en/html/

Schema type

grammar-based only

grammar- and rule-based

data types

weak

through W3C datatypes

Future development

frozen; bug fixes only

under continued development

Own namespace?

no

yes

ISO entities

yes

no, but can be loaded separately

XLink

no

yes

XInclude

no

yes

Schematron

no

yes

Customization method

Parameter entities

Definition patterns

Customization difficulty

more difficult

easier

Namespace support

no

yes

Reference in the instance document

DOCTYPE declaration

not required for RELAX NG

Version identification

through a DOCTYPE declaration

through the attribute version on the root element

Anchor attribute

id

xml:id

  

back to top