OpenOffice Bibliography FixHere you will find the OpenOffice Bibliography Fix, which addresses the issue of updating OO Writer bibliographical references from the Bibliographical database.
The ScenarioYou are writing a masterpiece in OpenOffice Writer using its Bibliography built-in feature, which is really helpful. As you write you do not have time to enter all the details for the bibliography records. It is more convenient to enter the details after the masterpiece is done. When you are done writing you update the bibliography with as much detail as possible. And then it happens - you realize that the Writer has ignored your updated records, it kept the original ones instead. You get frustrated, brake the computer and the masterpiece never gets finished.
The ProblemThe reason behind the OO Writer's behavior is simple. The Bibliography module keeps all of the records in its database (a DBF file), and once a reference to the record is inserted into Writer its content is copied from the database into the Writer document (ODT). This is not the problem, the problem is that OO Writer does not provide functionality to synchronize the contents between the Bibliography database and Writer document. This issue has been known by OO developers for almost five years now. The solution is simple, yet nothing has been done. They say that this issue will be fixed in the next major OO release. Unfortunately, this means that OO 2.x users will never be able to work with their bibliographies. Reference issues: 44189 18595 4260 50622 54975 29705
The SolutionThe solution to this problem is simple. The ODT format stores all of the information required to keep it in synch with the database. In particular, the ODT text:bibliography-mark attribute text:identifier can be used to make the synchronization needed. This identifier is the key function to connect bibliographical data from ODT to DB. This function has never been realized in OO, so DuSystems decided to implement it as a third-party opensource and free Java application available for download on this page.
TechnologyThe solution is a simple Java program. It reads data from ODT XML, compares it to the data from DBF, and updates ODT XML if necessary. DBF-related information is based on slightly modified jdbcwrapper sources. SAX parsing is based on sax.Writer from Xerces.
UsageAssuming that Java 5 (or later) is installed, java executable is present in the system path, the execution string is:
java -jar [options] oobf.jar odt_file dbf_file [encoding]
odt_file - the Writer document you want to update bibliography in
dbf_file - the DBF file containing the bibliography database. On Windows systems OO places it in C:\Documents and Settings\user\Application Data\OpenOffice.org\user\database\biblio On Linux systems OO places it in the home directory under .openoffice.org2/user/database/biblio
encoding - the bibliography database character encoding, defaults to UTF8. Default encoding depends on OO2.x version, so look it up! In Writer go to View->Data Sources, right-click on Bibliography, click Edit Database File, when Base is open go to Edit->Database->Properties->Additional Settings.
-e - erase bibliography mark if match not found in DBF. This option will completely erase the bibliography mark from your ODT if there is no matching record found in DBF.
LicenseThis piece of software is licensed under Lesser GPL license.
- Jens Nachtigall - for evaluating the first release and finding several issues.
DownloadPlease note: this software is provided 'as-is' and DuSystems is not responsible for any damage it may cause.
Please back-up your data before using OOBF!
Please direct your comments and patches to mihel (a_t) dusystems.com