You have a DocBook document in version 5.x, but you need 4.x.
Solution
Generally, the difference between version 4 and version 5 are
minimal. Refer to the The
Definitive Guide for detailed information what has been
added, removed, or renamed.
In case you have or get DocBook 5 and need the former
version, the following stylesheet which supports the
core transformation might help:
Use your favorite XSLT processor to transform your documents.
Discussion
The stylesheet from Example 3.3, “db5to4-core.xsl” imports
the templates from copy.xsl using an
identity transformation. That means, whatever
is not specified gets copied. In most cases
that is what you want—a DocBook 5 section element
will be transformed into an equally named DocBook 4
section element without the namespace.
Where it gets difficult are the new elements which are
introduced in DocBook 5. Whenever the stylesheet encounters
those it will print a warning. These elements are not copied to
the output stream. If you have one of those elements you need to
customize the stylesheet yourself.
Another issue is the almost ubiquitary info
element which can appear in structual and block elements. The
above stylesheet does it wrong and copies any info
element straight into the output stream. However, DocBook 4
has different element names for meta information in
DocBook 5. If you have info elements in your
document they have to be renamed, depending on the parent element:
Meta Information Inside Structural Elements. An info element inside a sect1
appends the suffix info to the name of
its parent element and is renamed therefore as
sect1info. This rule is applied for structural
elements like book, chapter, and
others.
Meta Information Inside Block Elements. An info element inside an example
is renamed as blockinfo. This rule is applied for
block elements like equation, figure,
and others.
Apart from the renaming, the order of the renamed info
element is crucial. Consider the following DocBook 5
structure:
section
title
info
This structure has to be renamed and reorganized as
follows:
section
sectioninfo
title
As you can see, the title element appears now
after the renamed info. All
these issues are solved with the following additional
stylesheet:
To combine both, use the following stylesheet:
The above stylesheets were separated between a core
functionality (db5to4-core.xsl) with
additional info element handling
(db5to4-info.xsl). In most cases you will use
the stylesheet db5to4-withinfo.xsl, but if
you want to implement a different info handling you
can. In Example 3.5, “db5to4-withinfo.xsl” just replace the
line with importing db5to4-info.xsl with your
own implementation.