1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2"http://www.w3.org/TR/html4/loose.dtd">
3<html>
4<head>
5<title>OSBib-Format</title>
6<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7<style type="text/css">
8<!--
9.style3 {color: #00CC00}
10.style9 {color: #CC00FF}
11.style11 {color: #FF0000}
12.style13 {color: #FF00FF}
13-->
14</style>
15</head>
16
17<body>
18<h1>OSBib-Format</h1>
19<h3>XML structure ~ Citation (In-text and Footnote style) </h3>
20<p> A collection of PHP classes to manage bibliographic formatting for OS bibliography software
21using the OSBib standard. Taken from and originally developed in WIKINDX (<a href="http://wikindx.sourceforge.net">http://wikindx.sourceforge.net</a>). </p>
22<p>Released through <a href="http://bibliophile.sourceforge.net">http://bibliophile.sourceforge.net</a> under the GPL licence.</p>
23<p>If you make improvements, please consider contacting the administrators at <a href="http://bibliophile.sourceforge.net">bibliophile.sourceforge.net</a> so that your improvements can be added to the release package.</p>
24<p><em>May 2005<br>
25  </em>Mark Grimshaw (<a href="http://wikindx.sourceforge.net">WIKINDX</a>)<br>
26  Andrea Rossato (<a href="http://uniwakka.sourceforge.net/HomePage">Uniwakka</a>)<br>
27  Guillaume Gardey (<a href="http://biborb.glymn.net/doku.php">BibOrb</a>)<br>
28Christian Boulanger (<a href="http://bibliograph.panya.de/">Bibliograph</a>)</p>
29<hr>
30<p><a href="#introduction">INTRODUCTION</a><br>
31<a href="#structure">STRUCTURE</a></p>
32<hr>
33<h3><a name="introduction"></a>INTRODUCTION</h3>
34<p>Use <span class="style3"><code><a href="osbib.html#bibformatLoadstyle">BIBFORMAT::loadStyle()</a> </code></span>to load and parse the XML file into usable arrays. The XML file is logically divided into four areas, <em>info</em> (see <a href="bibliography_xml.html">bibliography_xml</a>), <em>citation</em> (see below), <em>styleCommon</em> (see <a href="bibliography_xml.html">bibliography_xml</a>) and <em>styleTypes</em> (see <a href="bibliography_xml.html">bibliography_xml</a>).</p>
35<p>The <em>citation</em> array, as returned by <span class="style3"><code><a href="osbib.html#bibformatLoadstyle">BIBFORMAT::loadStyle()</a></code></span> and after being further parsed within CITEFORMAT <span class="style3"><code><a href="osbib.html#bibformatGetstyle"></a></code></span> will look something like:<br>
36    <code><span class="style9">Array ( [creatorStyle] =&gt; 0 [creatorOtherStyle] =&gt; 0 [creatorInitials] =&gt; 1 [creatorFirstName] =&gt; 1 [twoCreatorsSep] =&gt; &amp; [creatorSepFirstBetween] =&gt; , [creatorListSubsequentAbbreviation] =&gt; et al. [creatorSepNextBetween] =&gt; , [creatorSepNextLast] =&gt; , &amp; [creatorList] =&gt; 1 [creatorListMore] =&gt; 3 [creatorListLimit] =&gt; 1 [creatorListAbbreviation] =&gt; et al. [creatorUppercase] =&gt; on [creatorListSubsequentAbbreviationItalic] =&gt; on [creatorListAbbreviationItalic] =&gt; on [creatorListSubsequent] =&gt; 1 [creatorListSubsequentMore] =&gt; 3 [creatorListSubsequentLimit] =&gt; 1 [consecutiveCreator] =&gt; 1 [consecutiveCreatorSep] =&gt; , [template] =&gt; (|creator|%, %year|: pages|) [useInitials] =&gt; on [consecutiveCitationSep] =&gt; ; [yearFormat] =&gt; 2 [pageFormat] =&gt; 1 [templateSuperscript] =&gt; on [ambiguousName] =&gt; on [ambiguousMore] =&gt; on [ambiguousTitle] =&gt; on [ambiguousYear] =&gt; on [ibid] =&gt; ibid. [idem] =&gt; idem. [opCit] =&gt; op. cit. [ambiguousNameFormat] =&gt; 4 [ambiguousYearFormat] =&gt; 1 [footnotePagePosition] =&gt; 1 [footnotePageTemplate] =&gt; , pages [ibidPage] =&gt; on [footnoteStyle] =&gt; 0 [footnoteCitationPageFormat] =&gt; 2) </span></code></p>
37<p>Not all elements need be present so you should always test with PHP's <code>array_key_exists()</code> function. </p>
38<p>Because OSBib uses numeric indexing from 0 upwards, you should be careful to use something like:<br>
39    <span class="style3"><code>if($citation['creatorListSubsequentLimit'] === FALSE)<br>
40  ...</code></span></p>
41<p>to test for a FALSE value of an array element.</p>
42<hr>
43<h3><a name="structure"></a>STRUCTURE</h3>
44<p>The description here relates to the various elements of the <em>citation</em> array. Each element will have either an INTEGER value or a STRING value. </p>
45<table width="100%"  border="0" cellpadding="10" bgcolor="#CCCCCC">
46  <tr>
47    <td><h4>In-text citation style:</h4>
48    <p><span class="style11">Primary creators:<br>
49    </span>Primary creators are usually the author(s) of a resource but, depending on the type of resource, may be composers, inventors etc. etc. etc.
50    <p><span class="style3"><code>INTEGER creatorStyle</code></span> Ordering and display of the name elements for the first of the primary creators.
51    <p><code><span class="style3">INTEGER creatorOtherStyle</span></code> Ordering and display of the name elements for the remaining primary creators.
52    <pre>
53	 0	=>	'Joe Bloggs'
54	 1	=>	'Bloggs, Joe'
55	 2	=>	'Bloggs Joe'
56	 3	=>	Last name only</pre>        <p><code><span class="style3">STRING useInitials </span></code> If 'Last name only' is selected above, use initials to differentiate between creators with the same surname
57
58The value will be 'on' for yes otherwise the array element does not exist.
59      <p><span class="style3"><code>INTEGER creatorInitials</code></span> Formatting of initials for the primary creators.
60    <pre>
61	 0	=>	'T. U. '
62	 1	=>	'T.U.'
63	 2	=>	'T U '
64	 3	=>	'TU'</pre>    <p><span class="style3"><code>INTEGER creatorFirstName</code></span> Formatting of first name for the primary creators.
65    <pre>
66	 0	=>	Print the full first name(s)
67	 1	=>	Print initial(s) only</pre>    <p><span class="style3"><code>STRING twoCreatorsSep</code></span> Separator in the case of just two primary creators. </p>        <p><span class="style3"><code>STRING creatorSepFirstBetween</code></span> Separator between the first two primary creators in the case where there are more than two. </p>
68    <p><span class="style3"><code>STRING creatorSepNextBetween</code></span> Separator between the following primary creators after the first two in the case where there are more than two.</p>
69    <p><span class="style3"><code>STRING creatorSepNextLast </code></span> Separator between the last two primary creators in the case where there are more than two.</p>
70    <p><span class="style3"><code>STRING creatorUpperCase</code></span> Uppercase/lowercase primary creator names. The value will be 'on' for yes otherwise the array element does not exist.</p>    <p><span class="style3"><code>INTEGER creatorList</code></span> Abbreviations for multiple primary creators. </p>
71	<pre>
72	 0	=>	Print the full creator list
73	 1	=>	Limit the creator list
74</pre>    <p><span class="style3"><code>INTEGER creatorListMore</code></span> If more than this number of primary creators, format as per the limit defined here. Requires <span class="style3"><code>creatorList</code></span> to be '1'. </p>
75    <p><span class="style3"><code>INTEGER creatorListLimit</code></span> Print only this number of primary creators if limit is exceeded as defined here. Requires <span class="style3"><code>creatorList</code></span> to be '1'.</p>
76    <p><span class="style3"><code>STRING creatorListAbbreviation</code></span> If limit is exceeded as defined here, replace remaining primary creators with this string. Requires <span class="style3"><code>creatorList</code></span> to be '1'.</p>
77    <p><span class="style3"><code>STRING creatorListAbbreviationItalic</code></span> Italicize <span class="style3"><code>creatorListAbbreviation</code></span>. Requires <span class="style3"><code>creatorList</code></span> to be '1'. The value will be 'on' for yes otherwise the array element does not exist.</p>
78    <p><span class="style3"><code>INTEGER consecutiveCreator </code></span> Consecutive and juxtaposed citations by the same primary creator(s). </p>    <pre>
79	 0	=>	Print the creator list
80	 1	=>	Do not print the creator list</pre>    <p><span class="style3"><code>STRING consecutiveCreatorSep</code></span> String to separate consecutive and juxtaposed citations by the same primary creator(s) with if '1' is chosen for <span class="style3"><code>consecutiveCreator</code></span> above. e.g. (Grimshaw, Gardey &amp; Rossato 2005 p.32, 2001 pp.100-123). </p>
81    <p><span class="style11">Creator subsequent citations:<br>
82    </span><span class="style3"><code>INTEGER creatorListSubsequent</code></span> Abbreviations for multiple primary creators.<br>
83      <span class="style3"><code>INTEGER creatorListSubsequentMore</code></span> If more than this number of primary creators, format as per the limit defined here. Requires <span class="style3"><code>creatorListSubsequent</code></span> to be '1'. <br>
84      <span class="style3"><code>INTEGER creatorListSubsequentLimit</code></span> Print only this number of primary creators if limit is exceeded as defined here. Requires <span class="style3"><code>creatorListSubsequent</code></span> to be '1'.<br>
85      <span class="style3"><code>STRING creatorListSubsequentAbbreviation</code></span> If limit is exceeded as defined here, replace remaining primary creators with this string. Requires <span class="style3"><code>creatorListSubsequent</code></span> to be '1'.<br>
86      <span class="style3"><code>STRING creatorListSubsequentAbbreviationItalic</code></span> Italicize <span class="style3"><code>creatorListSubsequentAbbreviation</code></span>. Requires <span class="style3"><code>creatorListSubsequent</code></span> to be '1'. The value will be 'on' for yes otherwise the array element does not exist.</p>
87    <p><span class="style11">Citations:<br>
88      </span><code><span class="style3">STRING template </span></code>This is the template definition string such as <code><span class="style9">(|creator|%, %year|: ^p.^pp.^ pages|)</span></code>.</p>
89    <p><span class="style3"><code>STRING templateSuperscript </code></span> Italicize <span class="style3"><code>template</code></span>. The value will be 'on' for yes otherwise the array element does not exist. This would normally be used for integers in conjunction with footnote citation styles below.</p>
90    <p><span class="style3"><code>STRING consecutiveCitationSep </code></span> String to separate consecutive and juxtaposed citations with (Grimshaw, Gardey &amp; Rossato 2005 p.32; Pozzi 2001 pp.100-123).</p>
91    <p><span class="style3"><code>INTEGER pageFormat </code></span></p>
92    <pre>
93	 0	=>	'132-9'
94	 1	=>	'132-39'
95	 2	=>	'132-139'
96</pre>    <p><span class="style3"><code>INTEGER yearFormat </code></span></p>
97    <pre>
98	 0	=>	"1998"
99	 1	=>	"'98"
100	 2	=>	"98"
101</pre><p><span class="style11">Ambiguous citations:<br>
102      </span>These should be processed in the order given here until the citation is no longer ambiguous.</p>
103    <p><span class="style3"><code>STRING ambiguousName </code></span> Use the full name or initials (as defined by<code><span class="style3"> ambiguousNameFormat</span></code> below) of the primary creator(s) to disambiguate the citation. The value will be 'on' for yes otherwise the array element does not exist.</p>
104    <p><span class="style3"><code>STRING ambiguousMore</code></span> Use more of the primary creator(s) to disambiguate the citation. The value will be 'on' for yes otherwise the array element does not exist.</p>
105    <p><span class="style3"><code>STRING ambiguousTitle</code></span> Use the resource title to disambiguate the citation. The value will be 'on' for yes otherwise the array element does not exist.</p>
106    <p><span class="style3"><code>STRING ambiguousYear</code></span> Add a lowercase letter after the publication year (as defined by<code><span class="style3"> ambiguousYearFormat</span></code> below) to disambiguate the citation. The value will be 'on' for yes otherwise the array element does not exist.</p>
107    <p><span class="style3"><code>INTEGER ambiguousNameFormat</code></span></p>
108    <pre>
109	 0	=>	"Full name",
110	 1	=>	'T. U. '
111	 2	=>	'T.U.'
112	 3	=>	'T U '
113	 4	=>	'TU'</pre>
114<p><span class="style3"><code>INTEGER ambiguousYearFormat</code></span></p>
115<pre>
116	 0	=>	"Full name"
117	 1	=>	'1999a, b'
118	 2	=>	'1999a, 1999b'</pre></td>
119  </tr>
120</table>
121<br>
122<table width="100%"  border="0" cellpadding="10" bgcolor="#CCCCCC">
123  <tr>
124    <td><h4>Footnote citation style:</h4>
125      <p>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).       </p>
126      <p><span class="style3"><code>INTEGER footnoteStyle</code></span> How to format the citation.
127      <pre>
128	 0	=>	"Format like bibliography"
129	 1	=>	"Format like in-text citation"</pre>      <p><span class="style3"><code>STRING ibid </code></span> Replace consecutive citations for the same resource and the same page with this string.
130      <p><span class="style3"><code>STRING ibidPage </code></span>  If a string is given for <span class="style3"><code>ibid</code></span> above, print the citation page number(s) as well if <span class="style3"><code>footnoteCitationPageFormat</code></span>  below is not 0. If no string is given, the full citation should be printed. The value will be 'on' for yes otherwise the array element does not exist.
131      <p><span class="style3"><code>STRING idem </code></span>Replace consecutive citations for the same resource but a different page with this string. If no string is given, the behaviour should follow that of <span class="style3"><code>ibid </code></span> and <span class="style3"><code>ibidPage </code></span> above.
132      <p><span class="style3"><code>STRING opCit </code></span>Replace previously cited resources
133
134 with this string.
135 If no string is given, the behaviour should follow that of <span class="style3"><code>ibid </code></span> and <span class="style3"><code>ibidPage </code></span> above.
136      <p><span class="style3"><code>INTEGER footnoteCitationPageFormat</code></span>
137If 1 is chosen, the pages' field in the bibliographic templates for each type of resource should be used for the citation page(s). <pre>
138	 0	=>	"Never print citation page(s)"
139	 1	=>	"Same as the bibliographic templates"
140	 2	=>	"Use the template below"</pre>            <p><span class="style3"><code>STRING footnotePageTemplate </code></span> This is the template definition string such as <code><span class="style9">, ^p.^pp.^ pages</span></code> for the page number(s) if 2 is chosen for <span class="style3"><code>footnoteCitationPageFormat</code></span> above.
141	 <p><span class="style3"><code>INTEGER footnotePagePosition </code></span>
142     <pre>
143	 0	=>	"Before citation"
144	 1	=>	"After citation"</pre>
145    </td>
146  </tr>
147</table>
148<p>&nbsp; </p>
149</body>
150</html>
151