XML technologies / DocBook / Block elements / Revision histories

(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)

Use the element revhistory to create a revision history. Usually, revhistory is used as metadata (allowed in info, bookinfo, partinfo, chapterinfo and others). Use it to inform readers about changes to the corresponding element. For example, use revhistory:

Example: A typical revision history using revhistory

<revhistory>
    <revision>
        <revnumber>1.0</revnumber>
        <date>Okt. 2002</date>
        <authorinitials>tux</authorinitials>
        <revdescription>
            <para>...</para>
        </revdescription>
    </revision>
    <!-- evtl. weitere <revision> Elemente -->
</revhistory>

Line 2: The parent element revhistory contains at least one element revision.
Line 3: Revision number, which can be any value.
Line 4: Date of the revision
Line 5: Author’s initials
Line 6: Longer revision description; for shorter text, revremark is also possible.

Due to an oversight through version 4.2, this element can appear in unusual places such as seealso, lineannotation, title, link and quote. Do not use it there, as this was removed in DocBook 5!

Note: Automatic revision history with Subversion
Subversion can generate a revision history automatically, saving work for frequently changing documents. A stylesheet converts the output of svn log into a revhistory. XIncludes or external entities can include the generated file at the desired position.

A related addition is the attribute revision. It is available on every element in versions 4 and 5. With CVS or Subversion, the current version can be stored in a revision attribute. Add markers such as $Id:$, $Date:$ or $Revision:$ and the version control system fills in the current values:

<chapter revision="$Id: db-elements-block.xml 973 2009-07-12 19:20:52Z tom $">

  

back to top