This function automatically updates the following XML
in a Docbook file:
<revhistory>
<revision>
<revnumber>$Revision: 1.6 $</revnumber>
<date>$Date: 2005/03/28 17:20:31 $</date>
<authorinitials>$Author: ashawley $</authorinitials>
<revremark>
$Log: file.xml,v $
Revision 1.6 2005/03/28 17:20:31 ashawley
Spell checked document.
</revremark>
</revision>
</revhistory>
and removes the version-control (CVS/RCS) variables and
inserts a new empty "revision" element with the
version-control variables without any substituted values.
<revhistory>
<revision>
<revnumber>$Revision$</revnumber>
<date>$Date$</date>
<authorinitials>$Author$</authorinitials>
<revremark>
$Log$
</revremark>
</revision>
<revision>
<revnumber>1.6</revnumber>
<date>2005/03/28 17:20:31</date>
<authorinitials>ashawley</authorinitials>
<revremark>
Revision 1.6 2005/03/28 17:20:31 ashawley
Spell checked document.
</revremark>
</revision>
</revhistory>
The above is roughlty equivalent to the following shell
scripting:
sed -e 's/\$[A-Za-z]*: \(.*\)\$/\1/' -e '/\$Log/ d' -e
'/<revhistory>/ r revision.xml' manual.xml.in > manual.xml
The commands are available in Emacs at:
M-x my-docbook-xml-update-revision-element
and
M-x my-docbook-xml-insert-empty-revision-element
enjoy.
diff -c patch of emacs lisp code