Difference between revisions of "Bibliographic/Developer Page/API Enhancements"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (service LocatorFormatting ?)
(service Metadata and User Defined Data Access)
Line 183: Line 183:
 
== service Metadata and User Defined Data Access ==
 
== service Metadata and User Defined Data Access ==
  
This service refers to the proposed interface generalised  interface to support the new [http://wiki.oasis-open.org/office/Bibliographies_and_Citations?%20%0Aaction=show ODF metadata enhancements] expected in the release of ODF 1.2 next year, as well supporting user defined metadata and more generally user defined schema elements to the document XML. This interface would be need to support the '[http://extensions.openoffice.org/Extension Development Toolkit]'
+
This service refers to the proposed interface generalised  interface to support the recently approved ODF metadata enhancements [http://www.oasis-open.org/committees/download.php/24327/ODF-Metadata-Proposal.pdf pdf] expected in the release of ODF 1.2, as well supporting user defined metadata and more generally user defined schema elements to the document XML. This interface would be need to support the '[http://extensions.openoffice.org/Extension Development Toolkit]'
  
 
'''Service Functions:'''
 
'''Service Functions:'''

Revision as of 06:49, 12 July 2007

Back to Bibliographic Project index

This page is very much under construction and we would appreciate assistance in making it better.

Details of the current Bibliographic implementation and API reference documentation is available here. For an overview of Write and Citproc (the bibliographic formatting engine) interaction see Citeproc_Writer_Interaction

Terminology

For clarity, this project deals with the following pieces:

citation
a short description that points to a fuller description elsewhere, either in a note or a reference list. Called a 'bibliographic entry' in most of the OOo documentation.
reference item
a fuller description; also called a bibliographic entry or item
reference list
a collection of references; also called a bibliography

Introduction

Diagram showing the relationship between the Bibliographic API services and other key Writer services.

Diagram showing bibliographic API's

Notes to diagram:

  • The 'Extension Development Toolkit' (announcement pdf, video, home page) will:
    • Be able to implement OpenOffice.org extensions with appealing GUI look and feel.
    • Provide smart integration in OpenOffice.org help system.
    • Provide smart integration in “Tools / Options” dialog.
  • CiteProc refers to the Bibliographic formatting engine developed by Bruce D'Arcus [1].
  • CSL Files are the Citation Style Language files that provide the instructions to the CiteProc module to format the bibliographic citation and reference list according the standards defined in the various style manuals.
  • Data sharing through internet access to user reference data shall be provided through a Zoom interface.

Service BibliographicCitation

This is a new service to support the enhanced bibliographic features. It main function is the screen presentation and handling of Bibliographic Citation field. It's functions could include:

  • Insertion of citation marker (footnote / endnote or in-text) and the selection of citation options using a new User Interface panel 'Insert/Edit Citation'.
  • Visual marking of the citation field and its components [2].
  • The automatic selection of initial, subsequent and Ibid citation forms
  • The display of the context menu for the Bibliographic Citation field, which would include:
    • Edit Bibliographic Citation
  • The acceptance and display of citation options.
  • Support an Update function that will re-fetch and redisplay a single bibliographic citation (i.e. after making changes to the reference database). Also an function 'Update All' to update all citations in the document.


constants group BibliographyDataField

com :: sun :: star :: text ::

Stores the contants for the new Service BibliographicCitation (described above).

Description This constants group needs to be totally rewritten. The old definition was

“These values define parts of bibliographic data. They are used to create a
bibliography in a text document.”

The new definition is:

These values define the characteristics of an individual bibliographic entry
It no longer contains the bibliographic data but instead holds a key to the
bibliographic data stored in the bibliographic data file. 

Note: the constant type formattedText used below is used to indicate a new field type to support formatted text. 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." See details .

Constants - Type, name, description

string Key
This field contains a key which acts as an index to the bibliographic data stored in the biblio-data.xml file in the save package. The key is defined in the XML like this-
 <cite:biblioref cite:key="urn:isbn:0814712827#154"> 
formattedText CitationString
The formatted citation text, generated by CiteProc, to be displayed in the document. This contains a copy of the formattedText CitationStringInitial or CitationStringSubsequent depending upon the value of boolean IsInitial.
formattedText CitationStringInitial
The formatted initial citation text, generated by CiteProc, to be displayed.
formattedText CitationStringSubsequent.
The formatted initial citation text, generated by CiteProc, to be displayed.
formattedText CitationPrefix
The formatted text which the user considers citation prefix.( description)
formattedText CitationSuffix
The formatted text which the user considers citation suffix.( description)
formattedText CitationLocation
The formatted text which contains the location details (i.e. page number(s)). This is needed when we have Ibid + location.
string LocationType
The type of location page, chapter, track number (on a CD) etc.

(I now can not remember why I put this in - maybe it is not needed David Wilson 06:56, 20 March 2007 (CET) )

string Location
The number, name, description etc. of the location of the citation.
boolean IsInitial
Determines whether this citation is the first reference (ie first use of the hash key in the text) to the reference within the defined text range. Method: The current API of the Writer provides an interface XTextRangeCompare. With this interface two text ranges (citations are also text ranges) can be sorted. This interface is implemented at each text part (body text, header, footer, footnote areas, text frames, table cells, draw text).
formattedText IbidText
The formatted text generated by CiteProc, usually "Ibid" in English but may be different depending upon the language and style selected.
formattedText IbidTextLocation
The formatted text generated by CiteProc, in the style of "Ibid, pp xx-yy" in English but may be different depending upon the language and style selected.
boolean IsIbid
Determines whether this citation directly follows a citation to the same reference. (ie the the cite:key as the previous citation) so that the IbidText is displayed - a citation like 'Ibid, p 34.'
boolean IsIbidSameLocation
Determines whether this citation directly follows a citation to the same reference and location. (ie the same cite:key and the same location as the previous citation)so that the IbidTextLocation is displayed - a citation like "Ibid". NOTE: with no page reference because it is the same as the previous reference.
string CitationAuthorName
The author name of the citation
string CitationDate
The date of the citation
booleen ExcludeAuthorName
Determines whether this citation excludes the author name. This option is needed when you have referred to the author's name in the text and do not want it included in the citation. i.e.
Gao Xingjian in his novel 'sole mountain' (1990) explores identity 
and myth in China.
booleen ExcludeDate
Determines whether this citation excludes the date. This option is needed when you have referred to the date in the text and do not want it included in the citation. i.e.
The 1990 novel 'sole mountain' (GaoXingjian) explores identity and 
myth in China.

User Interface Panel Insert/Edit Bibliographic Citation

There are several separate and closely associated aspects to Inserting and Editing Bibliographic Citations.

  1. Adding a new reference Item into the document, that is the data relating to the item: Title, Author etc.
  2. Editing an existing reference item.
  3. Inserting a citation to a reference item.
  4. Selecting the citation display options (these mentioned above constants group BibliographyDataField).

As example panels see the Ibidem examples Insert Citation and Add/Edit reference

We need people to help us design the Bibliographic User Interface Panels.

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.

No longer required as it is redundant with the CiteProc formatting engine.

service BibliographicStyleEngine

This is a new service that will provide a the API interface to the bibliographic formatting module. This service separated Writer from the actual bibliographic formatting module allowing other formatting modules to be used.The default module will be CiteProc.

The service performs three functions -

  1. sending the reference ID as a key, the style name, the service calls on formatting module to return the formatted citation strings (as listed in service Bibliography below) so that the appropriate citation text can be inserted into the document.
  2. sending a list of the citation ID's in the appropriate text range (document or chapter), and the style name, to the formatting module which returns the formatted reference list for insertion into the document.
  3. returns the list available styles and their descriptions, so that user can select one.

service Bibliography

com :: sun :: star :: text :: FieldMaster ::

Description

specifies service of a Bibliography field master. See also

com::sun::star::text::TextField

This service needs to be totally rewritten. The current method for generating the bibliography reference list (Bibliography table) uses the standard OpenOffice.org indexing method. The one used for table of contents etc. The new service Bibliography field master will collect the list of citation keys in the document (according to the selected text range) and the DocumentStyleName (detailed below) and pass them to the new service Citeproc which will return the formatted Bibliography text to be inserted in the document.

None of the current list of constants for this service needs to be kept as Citeproc does not (at this stage) need any options passed to it. The current constants are:

  • boolean IsNumberEntries
  • string BracketBefore
  • string BracketAfter
  • sequence< ::com::sun::star::beans::PropertyValues > SortKeys
  •  ::com::sun::star::lang::Locale Locale

constants group BibliographydataField

Some new constants will be required to support he service:

boolean IsInText
Determines whether the citations are in-text or footnote/endnote citations. It will be a value provided by the CSL style sheet selected by the user to format bibliographic citations and reference list.
boolean CitationIsFootnote
Determines whether the citations are footnote or endnote citations.
string BibliographyReferenceListRange
The text range for the Reference list - per-chapter or per-document.
boolean ProtectBibliographyFromUserChanges
Determines whether the reference list text is protected or modifiable for user change. (This option is supported by the current Bibliography table mechanism)

Question Do we still need the original boolean IsNumberEntries for the case of numbered reference lists? If service BibliographicStyleEngine and Citeproc are going to return the 'formatted' sequence number (i.e with the appropriate brackets for the style), then we need to provide the sequence number through these services first.

User Interface Panel Insert / Edit Bibliography

A new User Interface Panel to Insert Bibliography / Reference List and to set the display options (as listed in the Service Bibliography Constants, above)

service Metadata and User Defined Data Access

This service refers to the proposed interface generalised interface to support the recently approved ODF metadata enhancements pdf expected in the release of ODF 1.2, as well supporting user defined metadata and more generally user defined schema elements to the document XML. This interface would be need to support the 'Development Toolkit'

Service Functions:

  • Add user schema to the document XML.
  • Query user schema in the document XML.
  • Add data conforming to user schema.
  • Read data conforming to user schema.
  • Access custom save package data via the Manifest.xml file.(Perhaps this is just a related function ???)

New Document Options

The Writer needs to support Document (Bibliographic) Style selection, saving and loading. The Document Style name would act to select the CiteProc CSL which the user selects to format the citations and reference table. The Writer should have a 'Document Style' field added which would contain the user selected Current Style Name. The Document Style selection GUI should provide a list, and descriptions of of the installed Document Style Packages. Other options would be to Import and Export for Document Style Packages. Ideally Document Style selection and options would be place in a new tab in the Format->Page panel.

service LocatorFormatting ?

Depending on who the formatting of the locator field is done. There may be a need for a service which requests CiteProc to return a formatted locator test string whenever a new location is added or changed. [see discussion

Locator formatting covers things like page numbers in documents, track or time in music and deals with the different locator formats that are style dependent. For example p or page, pp or pages, 123-128 or 123-8 etc.

New Document constants

(I am not sure which service these need to be added to ? Any suggestions please ? )

Some new constants will be required:

string AvailableStyles
list the available document styles obtained from service BibliographicStyleEngine.
string AvailableStyleDescriptions
The descriptions of the available document style obtained from service BibliographicStyleEngine.
string DocumentStyleName
holds the name of the user selected document style.

service ZoomAccess

OOo shall expose a standard API for remote and third-party access to the bibliographic reference data, based based on ZOOM (use Index Data's code here; we need to talk to the ID guys about this)

Personal tools