Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

OpenOffice Bibliographic implementation

Last Modified 2006-October-14 A printer friendly PDF version of this page is available implementation.pdf (134Kb)

Contents

Objective

This page provides some basic information about how Openoffice implements its bibliographic functions. It provides links to the detailed documentation provided by Openoffice. For related information see the Developer page. For details of our proposals for enhanceing the bibliographic API's see the wiki page.

File Save format

A simple example of how OpenOffice stores bibliographic information in its XML save file format xml-contents.html

The OpenOffice XML file format document is available. The bibliographic references are on pages 450-451 & 467-471 at http://xml.openoffice.org/general.

OpenOffice XML schemas

See the XML project site http://xml.openoffice.org

The OpenOffice file format DTD files are at http://xml.openoffice.org/source/browse/xml/xmloff/dtd/ , it is a large document so we have extracted the bibliographic bits in bib-dtd-bits.html .

A proposal to improved Openoffice XML support for citations in the OOo document format has been accepted by the OASIS OpenOffice XML Format Technical Committee (meeting minutes). See our XML Citation Proposal.pdf .

OpenOffice Bibliographic API code functions

This section contains a brief description of the OpenOffice Writer code functions that implement bibliographic services. Use the link to the full documentation to see more detailed explanations.

TextField

http://api.openoffice.org/docs/common/ref/com/sun/star/text/TextField.html

Description

A TextField is a TextContent which fades its textual representation into the text range to which it is anchored.

See the Developers Guide 7.3.5 Text Documents - Working with Text Documents - Text Fields

"Text fields are text contents that add a second level of information to text ranges. Usually their appearance fuses together with the surrounding text, but actually the presented text comes from elsewhere. Field commands can insert the current date, page number, total page numbers, a cross-reference to another area of text, the content of certain database fields, and many variables, such as fields with changing values, into the document. There are some fields that contain their own data, where others get the data from an attached field master."

Text Fields

Included Services

TextContent is an object which can be anchored in a text, like instances of TextFrame or TextFields .

Exported Interfaces

XTextField

Description

This interface is used to access the textual representation of this field.

[ OPTIONAL ]

Description

makes it possible to access the properties of the field, if any.

Comment by David Wilson

The data fields in the bibliography need to support complex formatted text and objects and this is not possible with the current text field. For example some scientific document titles need to be able to display words in Italics.

In discussing how to achieve this, Oliver Specht, has advised that the best approach was to enhance the bookmark object.

A possible solution is "to add a new object that is similar to bookmarks(com.sun.star.text.Bookmark). This extended bookmark would also carry a DOM tree property. This 'bookmark' can span over formatted text longer than a paragraph. The user can modify the text inside of this bookmark easily. An interface to access the new elements needs to be implemented (sorted by document position).

The DOM interfaces are in com.sun.star.xml.dom. (e.g. XDocument.idl,XNode.idl,XElement.idl)

There's also a service com.sun.star.xml.dom.DocumentBuilder available that supports the creation of DOM trees.

The bibliography component works on the DOM tree and can manipulate it independently. In case of using a field the component has to set the resulting string representation of the reference at this field." See issue 66979

XTextField.html#getPresentation

http://api.openoffice.org/docs/common/ref/

com/sun/star/text/XTextField.html#getPresentation

Description

is the base interface for all text fields.

A text field is embedded in text and expands to a sequence of characters.

See also

TextField

Methods' Summary

getPresentation

Methods' Details

getPresentation string

getPresentation( [in] boolean bShowCommand );

Returns

the display string of the text field either as the command of the field or as the output string.

Parameter bShowCommand

if true the command of the field will be returned

Bibliography

http://api.openoffice.org/docs/common/ref/com/sun/star/text/Bibliography.html#

Description

specifies service of bibliography table within a text document. See also BaseIndex.

Included Services

BaseIndex : specifies the basic service of different indexes within a document.

Properties' Summary

Locale : contains the locale of the index.

SortAlgorithm : contains the name of the sort algorithm that is used to sort the entries.

textfield/Bibliography

http://api.openoffice.org/docs/common/ref/com/sun/star/text/textfield/Bibliography.html#
Description

specifies service of a bibliography text field.

Bibliographic entry created by Insert – Indexes and Tables – Bibliography Entry. The content is the source of the creation of bibliographic indexes. The sequence <PropertyValue> in the property "Fields" contains pairs of the name of the field and its content, such as:

The names of the fields are defined in BibliographyDataField. A bibliographic entry depends on FieldMaster.Bibliography

FieldMaster/Bibliography

http://api.openoffice.org/docs/common/ref/com/sun/star/text/FieldMaster/Bibliography.html
Description

specifies service of a Bibliography [table] field master.

Included Services

A TextFieldMaster field specifies important data for its DependentTextFields.

Properties' Summary

IsNumberEntries : determines whether the bibliography text fields are numbered. If the short name of the bibliography entry is displayed instead.

IsSortByPosition : determines whether the bibliography entries in a bibliography index are sorted by the document position. If the SortKey property determines the sorting of the entries.

BracketBefore : determines the opening bracket used to display the bibliography text fields.

BracketAfter : determines the closing bracket used to display the bibliography text fields.

SortKeys : determines the sorting of the bibliography entries in a bibliography index. This property is used if the property IsSortByPosition is not set. Each contained element of the sequence is a sequence of the following two properties:

Locale : contains the locale of the field master.

SortAlgorithm : contains the name of the sort algorithm that is used to sort the text fields.

Comment by David Wilson

The range of options will need to be enhanced.

BibliographyDataField

http://api.openoffice.org/docs/common/ref/com/sun/star/text/BibliographyDataField.html#
Description

These values define parts of bibliographic data. They are used to create a bibliography in a text document. Depending on the type of the data some of the fields will usually be left empty.

Constants
  • IDENTIFIER : This field contains a unique identifier for the bibliographic data.
  • BIBILIOGRAPHIC_TYPE : This field contains the type of the bibliographic reference. It is of the type bibliographydatafield.
  • ADDRESS : This field contains the address of the publisher.
  • ANNOTE : This field contains an annotation.
  • AUTHOR : This field contains the name(s) of the author(s)
  • BOOKTITLE : This field contains the title of the book.
  • CHAPTER : This field contains the name or number of the chapter.
  • EDITION : This field contains the number or name of the edition.
  • EDITOR : This field contains the name(s) of the editor(s)
  • HOWPUBLISHED : This field contains a description of the type of the publishing.
  • INSTITUTION : This field contains the name of the institution where the publishing was created.
  • JOURNAL : This field contains the name of the journal.
  • MONTH : This field contains number or name of the month of the publishing.
  • NOTE : This field contains a note.
  • NUMBER : This field contains the number of the publishing.
  • ORGANIZATIONS : This field contains the name of the organizations where the publishing was created.
  • PAGES : This field contains the number(s) of the page(s) of the reference into a publishing.
  • PUBLISHER : This field contains the name of the publisher.
  • SCHOOL : This field contains the name of the university or school where the publishing was created.
  • SERIES : This field contains the series of the publishing.
  • TITLE : This field contains the title of the publishing.
  • REPORT_TYPE : This field contains a description of the type of the report.
  • VOLUME : This field contains the volume of the publishing.
  • YEAR : This field contains the year when the publishing was created.
  • URL : This field contains URL of the publishing.
  • CUSTOM1 : This field contains user defined data.
  • CUSTOM2 : This field contains user defined data.
  • CUSTOM3 : This field contains user defined data.
  • CUSTOM4 : This field contains user defined data.
  • CUSTOM5 : This field contains user defined data.
  • ISBN : This field contains the ISBN data of the publishing.
Comment by David Wilson

This field is currently inserted with every bibliographic citation instance. No link is maintained with the original data source in the bibliographic database. If a mistake is made each separate instance of the field must be re-inserted or corrected manually.

It is proposed that a new field be created a 'MasterBibliographyDataField' which would be inserted the first time a citation was used and all BibliographyDataFields would contain a link to their MasterBibliographyDataField. The MasterBibliographyDataField would be linked to its datasource (initially the bibliographic database, but others are possible) and would be updated by the Writer link update function. When the MasterBibliographyDataField was updated all the linked BibliographyDataField instances, and the Bibliographic Table would be updated as well.

TextSection

http://api.openoffice.org/docs/common/ref/com/sun/star/text/TextSection.html

A TextSection is a range of complete paragraphs within a text.

The content of the section may be the content of a link into another document, a link from the same document, or the result of a DDE operation.

TextSection instances can be linked from and to other texts

See Developers Guide 7.4.4 Text Documents - Overall Document Features - Text Sections
Comment by David Wilson

It is proposed that the new bibliographic table mechanism Citproc be used to insert the bibliographic table into a TextSection.

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.