A collection of PHP classes to manage bibliographic formatting for OS bibliography software using the OSBib standard. Taken from and originally developed in WIKINDX (http://wikindx.sourceforge.net).
Released through http://bibliophile.sourceforge.net under the GPL licence.
If you make improvements, please consider contacting the administrators at bibliophile.sourceforge.net so that your improvements can be added to the release package.
May 2005
Mark Grimshaw (WIKINDX)
Andrea Rossato (Uniwakka)
Guillaume Gardey (BibOrb)
Christian Boulanger (Bibliograph)
Use BIBFORMAT::loadStyle()
to load and parse the XML file into usable arrays. The XML file is logically divided into four areas, info (see bibliography_xml), citation (see below), styleCommon (see bibliography_xml) and styleTypes (see bibliography_xml).
The citation array, as returned by BIBFORMAT::loadStyle()
and after being further parsed within CITEFORMAT will look something like:
Array ( [creatorStyle] => 0 [creatorOtherStyle] => 0 [creatorInitials] => 1 [creatorFirstName] => 1 [twoCreatorsSep] => & [creatorSepFirstBetween] => , [creatorListSubsequentAbbreviation] => et al. [creatorSepNextBetween] => , [creatorSepNextLast] => , & [creatorList] => 1 [creatorListMore] => 3 [creatorListLimit] => 1 [creatorListAbbreviation] => et al. [creatorUppercase] => on [creatorListSubsequentAbbreviationItalic] => on [creatorListAbbreviationItalic] => on [creatorListSubsequent] => 1 [creatorListSubsequentMore] => 3 [creatorListSubsequentLimit] => 1 [consecutiveCreator] => 1 [consecutiveCreatorSep] => , [template] => (|creator|%, %year|: pages|) [useInitials] => on [consecutiveCitationSep] => ; [yearFormat] => 2 [pageFormat] => 1 [templateSuperscript] => on [ambiguousName] => on [ambiguousMore] => on [ambiguousTitle] => on [ambiguousYear] => on [ibid] => ibid. [idem] => idem. [opCit] => op. cit. [ambiguousNameFormat] => 4 [ambiguousYearFormat] => 1 [footnotePagePosition] => 1 [footnotePageTemplate] => , pages [ibidPage] => on [footnoteStyle] => 0 [footnoteCitationPageFormat] => 2)
Not all elements need be present so you should always test with PHP's array_key_exists()
function.
Because OSBib uses numeric indexing from 0 upwards, you should be careful to use something like:
if($citation['creatorListSubsequentLimit'] === FALSE)
...
to test for a FALSE value of an array element.
The description here relates to the various elements of the citation array. Each element will have either an INTEGER value or a STRING value.
In-text citation style:Primary creators:
0 => 'Joe Bloggs' 1 => 'Bloggs, Joe' 2 => 'Bloggs Joe' 3 => Last name only
0 => 'T. U. ' 1 => 'T.U.' 2 => 'T U ' 3 => 'TU'
0 => Print the full first name(s) 1 => Print initial(s) only
0 => Print the full creator list 1 => Limit the creator list
0 => Print the creator list 1 => Do not print the creator list
Creator subsequent citations: Citations:
0 => '132-9' 1 => '132-39' 2 => '132-139'
0 => "1998" 1 => "'98" 2 => "98" Ambiguous citations:
0 => "Full name", 1 => 'T. U. ' 2 => 'T.U.' 3 => 'T U ' 4 => 'TU'
0 => "Full name" 1 => '1999a, b' 2 => '1999a, 1999b' |
Footnote citation style:For footnote style citations, OSBib will format the citation as for bibliographic lists with the addition of page numbers. For articles that are part of a collection and that would normally display the complete page range of the article, this page range will be removed leaving just the citation page(s).
0 => "Format like bibliography" 1 => "Format like in-text citation"
0 => "Never print citation page(s)" 1 => "Same as the bibliographic templates" 2 => "Use the template below"
0 => "Before citation" 1 => "After citation" |