citeproc-js 0.0.1.pre.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ module CiteProc
2
+ module JS
3
+ VERSION = '0.0.1.pre.1'.freeze
4
+ end
5
+ end
@@ -0,0 +1,105 @@
1
+ require 'spec_helper'
2
+
3
+ module CiteProc
4
+ module JS
5
+ describe 'Engine' do
6
+
7
+ let(:subject) do
8
+ Engine.new do |e|
9
+ p = double(:processor)
10
+ p.stub(:options).and_return { Processor.defaults }
11
+ p.stub(:items).and_return { load_items('items') }
12
+ e.processor = p
13
+ e.style = load_style('apa')
14
+ e.locales = { :'en-US' => load_locale('en-US') }
15
+ end
16
+ end
17
+
18
+ it { should_not be nil }
19
+
20
+ describe '#version' do
21
+ it 'returns a 1.x version string' do
22
+ subject.version.should =~ /^1\.[\d\.]+/
23
+ end
24
+ end
25
+
26
+ describe '#name' do
27
+ it 'returns "citeproc-js"' do
28
+ subject.name.should == 'citeproc-js'
29
+ end
30
+ end
31
+
32
+ describe '#type' do
33
+ it 'returns "CSL"' do
34
+ subject.type.should == 'CSL'
35
+ end
36
+ end
37
+
38
+ context 'when started' do
39
+ before(:each) { subject.start }
40
+ after(:each) { subject.stop }
41
+
42
+ describe '#processor_version' do
43
+ it 'returns the citeproc-js version' do
44
+ subject.processor_version.should =~ /^[\d\.]+$/
45
+ end
46
+ end
47
+
48
+ describe '#flags' do
49
+ it 'returns a hash of flags' do
50
+ subject.flags.should have_key('sort_citations')
51
+ end
52
+ end
53
+
54
+ describe '#default_namespace=' do
55
+ it 'sets the abbreviation namespace' do
56
+ lambda { subject.default_namespace = :default }.should_not raise_error
57
+ end
58
+ end
59
+
60
+ describe '#registry' do
61
+ it 'is a hash' do
62
+ subject.registry.should be_a(Hash)
63
+ end
64
+ end
65
+
66
+ describe '#update_items' do
67
+ it 'given a list of ids, loads the corresponding items into the engine' do
68
+ expect { subject.update_items(['ITEM-1']) }.to
69
+ change { subject.registry[:inserts].length }.by(1)
70
+ end
71
+ end
72
+
73
+ describe '#bibliography' do
74
+ it 'returns an empty bibliography by default' do
75
+ subject.bibliography[1].should be_empty
76
+ end
77
+
78
+ describe 'when items were processed' do
79
+ before(:each) { subject.update_items(['ITEM-1']) }
80
+
81
+ it 'returns the bibliography when at least one item was processed' do
82
+ subject.bibliography[1].should_not be_empty
83
+ end
84
+ end
85
+ end
86
+
87
+ describe '#sorted_registry_items' do
88
+ it 'returns an empty bibliography by default' do
89
+ subject.sorted_registry_items.should be_empty
90
+ end
91
+
92
+ describe 'when items were processed' do
93
+ before(:each) { subject.update_items(['ITEM-1']) }
94
+
95
+ it 'returns the bibliography when at least one item was processed' do
96
+ subject.sorted_registry_items.should_not be_empty
97
+ end
98
+ end
99
+ end
100
+
101
+ end
102
+
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,22 @@
1
+ {
2
+ "ITEM-1": {
3
+ "id": "ITEM-1",
4
+ "title":"Boundaries of Dissent: Protest and State Power in the Media Age",
5
+ "author": [
6
+ {
7
+ "family": "D'Arcus",
8
+ "given": "Bruce",
9
+ "static-ordering": false
10
+ }
11
+ ],
12
+ "note":"The apostrophe in Bruce's name appears in proper typeset form.",
13
+ "publisher": "Routledge",
14
+ "publisher-place": "New York",
15
+ "issued": {
16
+ "date-parts":[
17
+ [2006]
18
+ ]
19
+ },
20
+ "type": "book"
21
+ }
22
+ }
@@ -0,0 +1,304 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0" xml:lang="en-US">
3
+ <style-options punctuation-in-quote="true"/>
4
+ <date form="text">
5
+ <date-part name="month" suffix=" "/>
6
+ <date-part name="day" form="numeric-leading-zeros" suffix=", "/>
7
+ <date-part name="year"/>
8
+ </date>
9
+ <date form="numeric">
10
+ <date-part name="month" form="numeric-leading-zeros" suffix="/"/>
11
+ <date-part name="day" form="numeric-leading-zeros" suffix="/"/>
12
+ <date-part name="year"/>
13
+ </date>
14
+ <terms>
15
+ <term name="accessed">accessed</term>
16
+ <term name="and">and</term>
17
+ <term name="and others">and others</term>
18
+ <term name="anonymous">anonymous</term>
19
+ <term name="anonymous" form="short">anon.</term>
20
+ <term name="at">at</term>
21
+ <term name="by">by</term>
22
+ <term name="circa">circa</term>
23
+ <term name="circa" form="short">c.</term>
24
+ <term name="cited">cited</term>
25
+ <term name="edition">
26
+ <single>edition</single>
27
+ <multiple>editions</multiple>
28
+ </term>
29
+ <term name="edition" form="short">ed.</term>
30
+ <term name="et-al">et al.</term>
31
+ <term name="forthcoming">forthcoming</term>
32
+ <term name="from">from</term>
33
+ <term name="ibid">ibid.</term>
34
+ <term name="in">in</term>
35
+ <term name="in press">in press</term>
36
+ <term name="internet">internet</term>
37
+ <term name="interview">interview</term>
38
+ <term name="letter">letter</term>
39
+ <term name="no date">no date</term>
40
+ <term name="no date" form="short">n.d.</term>
41
+ <term name="online">online</term>
42
+ <term name="presented at">presented at the</term>
43
+ <term name="reference">
44
+ <single>reference</single>
45
+ <multiple>references</multiple>
46
+ </term>
47
+ <term name="reference" form="short">
48
+ <single>ref.</single>
49
+ <multiple>refs.</multiple>
50
+ </term>
51
+ <term name="retrieved">retrieved</term>
52
+
53
+ <!-- ANNO DOMINI; BEFORE CHRIST -->
54
+ <term name="ad">AD</term>
55
+ <term name="bc">BC</term>
56
+
57
+ <!-- QUOTES -->
58
+ <term name="open-quote">“</term>
59
+ <term name="close-quote">”</term>
60
+ <term name="open-inner-quote">‘</term>
61
+ <term name="close-inner-quote">’</term>
62
+
63
+ <!-- ORDINALS -->
64
+ <term name="ordinal-01">st</term>
65
+ <term name="ordinal-02">nd</term>
66
+ <term name="ordinal-03">rd</term>
67
+ <term name="ordinal-04">th</term>
68
+
69
+ <!-- LONG ORDINALS -->
70
+ <term name="long-ordinal-01">first</term>
71
+ <term name="long-ordinal-02">second</term>
72
+ <term name="long-ordinal-03">third</term>
73
+ <term name="long-ordinal-04">fourth</term>
74
+ <term name="long-ordinal-05">fifth</term>
75
+ <term name="long-ordinal-06">sixth</term>
76
+ <term name="long-ordinal-07">seventh</term>
77
+ <term name="long-ordinal-08">eighth</term>
78
+ <term name="long-ordinal-09">ninth</term>
79
+ <term name="long-ordinal-10">tenth</term>
80
+
81
+ <!-- CATEGORIES -->
82
+ <term name="anthropology">anthropology</term>
83
+ <term name="astronomy">astronomy</term>
84
+ <term name="biology">biology</term>
85
+ <term name="botany">botany</term>
86
+ <term name="chemistry">chemistry</term>
87
+ <term name="engineering">engineering</term>
88
+ <term name="generic-base">generic base</term>
89
+ <term name="geography">geography</term>
90
+ <term name="geology">geology</term>
91
+ <term name="history">history</term>
92
+ <term name="humanities">humanities</term>
93
+ <term name="linguistics">linguistics</term>
94
+ <term name="literature">literature</term>
95
+ <term name="math">math</term>
96
+ <term name="medicine">medicine</term>
97
+ <term name="philosophy">philosophy</term>
98
+ <term name="physics">physics</term>
99
+ <term name="psychology">psychology</term>
100
+ <term name="sociology">sociology</term>
101
+ <term name="science">science</term>
102
+ <term name="political_science">political science</term>
103
+ <term name="social_science">social science</term>
104
+ <term name="theology">theology</term>
105
+ <term name="zoology">zoology</term>
106
+
107
+ <!-- LONG LOCATOR FORMS -->
108
+ <term name="book">
109
+ <single>book</single>
110
+ <multiple>books</multiple>
111
+ </term>
112
+ <term name="chapter">
113
+ <single>chapter</single>
114
+ <multiple>chapters</multiple>
115
+ </term>
116
+ <term name="column">
117
+ <single>column</single>
118
+ <multiple>columns</multiple>
119
+ </term>
120
+ <term name="figure">
121
+ <single>figure</single>
122
+ <multiple>figures</multiple>
123
+ </term>
124
+ <term name="folio">
125
+ <single>folio</single>
126
+ <multiple>folios</multiple>
127
+ </term>
128
+ <term name="issue">
129
+ <single>number</single>
130
+ <multiple>numbers</multiple>
131
+ </term>
132
+ <term name="line">
133
+ <single>line</single>
134
+ <multiple>lines</multiple>
135
+ </term>
136
+ <term name="note">
137
+ <single>note</single>
138
+ <multiple>notes</multiple>
139
+ </term>
140
+ <term name="opus">
141
+ <single>opus</single>
142
+ <multiple>opera</multiple>
143
+ </term>
144
+ <term name="page">
145
+ <single>page</single>
146
+ <multiple>pages</multiple>
147
+ </term>
148
+ <term name="paragraph">
149
+ <single>paragraph</single>
150
+ <multiple>paragraph</multiple>
151
+ </term>
152
+ <term name="part">
153
+ <single>part</single>
154
+ <multiple>parts</multiple>
155
+ </term>
156
+ <term name="section">
157
+ <single>section</single>
158
+ <multiple>sections</multiple>
159
+ </term>
160
+ <term name="sub verbo">
161
+ <single>sub verbo</single>
162
+ <multiple>sub verbis</multiple>
163
+ </term>
164
+ <term name="verse">
165
+ <single>verse</single>
166
+ <multiple>verses</multiple>
167
+ </term>
168
+ <term name="volume">
169
+ <single>volume</single>
170
+ <multiple>volumes</multiple>
171
+ </term>
172
+
173
+ <!-- SHORT LOCATOR FORMS -->
174
+ <term name="book" form="short">bk.</term>
175
+ <term name="chapter" form="short">chap.</term>
176
+ <term name="column" form="short">col.</term>
177
+ <term name="figure" form="short">fig.</term>
178
+ <term name="folio" form="short">f.</term>
179
+ <term name="issue" form="short">no.</term>
180
+ <term name="opus" form="short">op.</term>
181
+ <term name="page" form="short">
182
+ <single>p.</single>
183
+ <multiple>pp.</multiple>
184
+ </term>
185
+ <term name="paragraph" form="short">para.</term>
186
+ <term name="part" form="short">pt.</term>
187
+ <term name="section" form="short">sec.</term>
188
+ <term name="sub verbo" form="short">
189
+ <single>s.v.</single>
190
+ <multiple>s.vv.</multiple>
191
+ </term>
192
+ <term name="verse" form="short">
193
+ <single>v.</single>
194
+ <multiple>vv.</multiple>
195
+ </term>
196
+ <term name="volume" form="short">
197
+ <single>vol.</single>
198
+ <multiple>vols.</multiple>
199
+ </term>
200
+
201
+ <!-- SYMBOL LOCATOR FORMS -->
202
+ <term name="paragraph" form="symbol">
203
+ <single>¶</single>
204
+ <multiple>¶¶</multiple>
205
+ </term>
206
+ <term name="section" form="symbol">
207
+ <single>§</single>
208
+ <multiple>§§</multiple>
209
+ </term>
210
+
211
+ <!-- LONG ROLE FORMS -->
212
+ <term name="author">
213
+ <single/>
214
+ <multiple/>
215
+ </term>
216
+ <term name="editor">
217
+ <single>editor</single>
218
+ <multiple>editors</multiple>
219
+ </term>
220
+ <term name="editorial-director">
221
+ <single>editor</single>
222
+ <multiple>editors</multiple>
223
+ </term>
224
+ <term name="translator">
225
+ <single>translator</single>
226
+ <multiple>translators</multiple>
227
+ </term>
228
+ <term name="editortranslator">
229
+ <single>editor &amp; translator</single>
230
+ <multiple>editors &amp; translators</multiple>
231
+ </term>
232
+
233
+ <!-- SHORT ROLE FORMS -->
234
+ <term name="author" form="short">
235
+ <single/>
236
+ <multiple/>
237
+ </term>
238
+ <term name="editor" form="short">
239
+ <single>ed.</single>
240
+ <multiple>eds.</multiple>
241
+ </term>
242
+ <term name="editorial-director" form="short">
243
+ <single>ed.</single>
244
+ <multiple>eds.</multiple>
245
+ </term>
246
+ <term name="translator" form="short">
247
+ <single>tran.</single>
248
+ <multiple>trans.</multiple>
249
+ </term>
250
+ <term name="editortranslator" form="short">
251
+ <single>ed. &amp; tran.</single>
252
+ <multiple>eds. &amp; trans.</multiple>
253
+ </term>
254
+
255
+ <!-- VERB ROLE FORMS -->
256
+ <term name="editor" form="verb">edited by</term>
257
+ <term name="editorial-director" form="verb">edited by</term>
258
+ <term name="translator" form="verb">translated by</term>
259
+ <term name="editortranslator" form="verb">edited &amp; translated by</term>
260
+ <term name="recipient" form="verb">to</term>
261
+ <term name="interviewer" form="verb">interview by</term>
262
+
263
+ <!-- SHORT VERB ROLE FORMS -->
264
+ <term name="container-author" form="verb-short">by</term>
265
+ <term name="editor" form="verb-short">ed.</term>
266
+ <term name="editorial-director" form="verb-short">ed.</term>
267
+ <term name="translator" form="verb-short">trans.</term>
268
+ <term name="editortranslator" form="verb-short">ed. &amp; trans. by</term>
269
+
270
+ <!-- LONG MONTH FORMS -->
271
+ <term name="month-01">January</term>
272
+ <term name="month-02">February</term>
273
+ <term name="month-03">March</term>
274
+ <term name="month-04">April</term>
275
+ <term name="month-05">May</term>
276
+ <term name="month-06">June</term>
277
+ <term name="month-07">July</term>
278
+ <term name="month-08">August</term>
279
+ <term name="month-09">September</term>
280
+ <term name="month-10">October</term>
281
+ <term name="month-11">November</term>
282
+ <term name="month-12">December</term>
283
+
284
+ <!-- SHORT MONTH FORMS -->
285
+ <term name="month-01" form="short">Jan.</term>
286
+ <term name="month-02" form="short">Feb.</term>
287
+ <term name="month-03" form="short">Mar.</term>
288
+ <term name="month-04" form="short">Apr.</term>
289
+ <term name="month-05" form="short">May</term>
290
+ <term name="month-06" form="short">Jun.</term>
291
+ <term name="month-07" form="short">Jul.</term>
292
+ <term name="month-08" form="short">Aug.</term>
293
+ <term name="month-09" form="short">Sep.</term>
294
+ <term name="month-10" form="short">Oct.</term>
295
+ <term name="month-11" form="short">Nov.</term>
296
+ <term name="month-12" form="short">Dec.</term>
297
+
298
+ <!-- SEASONS -->
299
+ <term name="season-01">Spring</term>
300
+ <term name="season-02">Summer</term>
301
+ <term name="season-03">Autumn</term>
302
+ <term name="season-04">Winter</term>
303
+ </terms>
304
+ </locale>
@@ -0,0 +1,361 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only">
3
+ <info>
4
+ <title>American Psychological Association 6th Edition</title>
5
+ <id>http://www.zotero.org/styles/apa</id>
6
+ <link href="http://www.zotero.org/styles/apa" rel="self"/>
7
+ <link href="http://owl.english.purdue.edu/owl/resource/560/01/" rel="documentation"/>
8
+ <author>
9
+ <name>Simon Kornblith</name>
10
+ <email>simon@simonster.com</email>
11
+ </author>
12
+ <contributor>
13
+ <name>Bruce D'Arcus</name>
14
+ </contributor>
15
+ <contributor>
16
+ <name>Curtis M. Humphrey</name>
17
+ </contributor>
18
+ <contributor>
19
+ <name>Richard Karnesky</name>
20
+ <email>karnesky+zotero@gmail.com</email>
21
+ <uri>http://arc.nucapt.northwestern.edu/Richard_Karnesky</uri>
22
+ </contributor>
23
+ <contributor>
24
+ <name>Sebastian Karcher</name>
25
+ </contributor>
26
+ <category field="psychology"/>
27
+ <category field="generic-base"/>
28
+ <category citation-format="author-date"/>
29
+ <updated>2010-01-27T20:08:03+00:00</updated>
30
+ <rights>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/</rights>
31
+ </info>
32
+ <locale xml:lang="en">
33
+ <terms>
34
+ <term name="translator" form="short">
35
+ <single>trans.</single>
36
+ <multiple>trans.</multiple>
37
+ </term>
38
+ </terms>
39
+ </locale>
40
+ <macro name="container-contributors">
41
+ <choose>
42
+ <if type="chapter paper-conference" match="any">
43
+ <text term="in" text-case="capitalize-first" suffix=" "/>
44
+ <names variable="editor" delimiter=", " suffix=", ">
45
+ <name and="symbol" initialize-with=". " delimiter=", "/>
46
+ <label form="short" prefix=" (" text-case="capitalize-first" suffix=")"/>
47
+ <substitute>
48
+ <names variable="translator"/>
49
+ </substitute>
50
+ </names>
51
+ </if>
52
+ </choose>
53
+ </macro>
54
+ <macro name="secondary-contributors">
55
+ <choose>
56
+ <if type="chapter paper-conference" match="none">
57
+ <names variable="translator" delimiter=", " prefix=" (" suffix=")">
58
+ <name and="symbol" initialize-with=". " delimiter=", "/>
59
+ <label form="short" prefix=", " text-case="capitalize-first" suffix=""/>
60
+ <substitute>
61
+ <names variable="editor"/>
62
+ </substitute>
63
+ </names>
64
+ </if>
65
+ </choose>
66
+ </macro>
67
+ <macro name="author">
68
+ <names variable="author">
69
+ <name name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with=". " delimiter=", " delimiter-precedes-last="always"/>
70
+ <label form="short" prefix=" (" suffix=".)" text-case="capitalize-first" strip-periods="true"/>
71
+ <substitute>
72
+ <names variable="editor"/>
73
+ <names variable="translator"/>
74
+ <choose>
75
+ <if type="report">
76
+ <text variable="publisher"/>
77
+ <text macro="title"/>
78
+ </if>
79
+ <else>
80
+ <text macro="title"/>
81
+ </else>
82
+ </choose>
83
+ </substitute>
84
+ </names>
85
+ </macro>
86
+ <macro name="author-short">
87
+ <names variable="author">
88
+ <name form="short" and="symbol" delimiter=", " initialize-with=". "/>
89
+ <substitute>
90
+ <names variable="editor"/>
91
+ <names variable="translator"/>
92
+ <choose>
93
+ <if type="report">
94
+ <text variable="publisher"/>
95
+ <text variable="title" form="short" font-style="italic"/>
96
+ </if>
97
+ <else-if type="bill book graphic legal_case motion_picture song" match="any">
98
+ <text variable="title" form="short" font-style="italic"/>
99
+ </else-if>
100
+ <else>
101
+ <text variable="title" form="short" quotes="true"/>
102
+ </else>
103
+ </choose>
104
+ </substitute>
105
+ </names>
106
+ </macro>
107
+ <macro name="access">
108
+ <choose>
109
+ <if type="thesis">
110
+ <choose>
111
+ <if variable="archive" match="any">
112
+ <group>
113
+ <text term="retrieved" text-case="capitalize-first" suffix=" "/>
114
+ <text term="from" suffix=" "/>
115
+ <text variable="archive" suffix="."/>
116
+ <text variable="archive_location" prefix=" (" suffix=")"/>
117
+ </group>
118
+ </if>
119
+ <else>
120
+ <group>
121
+ <text term="retrieved" text-case="capitalize-first" suffix=" "/>
122
+ <text term="from" suffix=" "/>
123
+ <text variable="URL"/>
124
+ </group>
125
+ </else>
126
+ </choose>
127
+ </if>
128
+ <else>
129
+ <choose>
130
+ <if variable="DOI">
131
+ <text variable="DOI" prefix="doi:"/>
132
+ </if>
133
+ <else>
134
+ <choose>
135
+ <if type="webpage">
136
+ <group>
137
+ <text term="retrieved" text-case="capitalize-first" suffix=" "/>
138
+ <date variable="accessed" suffix=", ">
139
+ <date-part name="month" suffix=" "/>
140
+ <date-part name="day" suffix=", "/>
141
+ <date-part name="year"/>
142
+ </date>
143
+ <group>
144
+ <text term="from" suffix=" "/>
145
+ <text variable="URL"/>
146
+ </group>
147
+ </group>
148
+ </if>
149
+ <else>
150
+ <group>
151
+ <text term="retrieved" text-case="capitalize-first" suffix=" "/>
152
+ <text term="from" suffix=" "/>
153
+ <text variable="URL"/>
154
+ </group>
155
+ </else>
156
+ </choose>
157
+ </else>
158
+ </choose>
159
+ </else>
160
+ </choose>
161
+ </macro>
162
+ <macro name="title">
163
+ <choose>
164
+ <if type="report thesis" match="any">
165
+ <text variable="title" font-style="italic"/>
166
+ <group prefix=" (" suffix=")">
167
+ <text variable="genre"/>
168
+ <text variable="number" prefix=" No. "/>
169
+ </group>
170
+ </if>
171
+ <else-if type="bill book graphic legal_case motion_picture report song manuscript speech" match="any">
172
+ <text variable="title" font-style="italic"/>
173
+ </else-if>
174
+ <else>
175
+ <text variable="title"/>
176
+ </else>
177
+ </choose>
178
+ </macro>
179
+ <macro name="publisher">
180
+ <choose>
181
+ <if type="report" match="any">
182
+ <group delimiter=": ">
183
+ <text variable="publisher-place"/>
184
+ <text variable="publisher"/>
185
+ </group>
186
+ </if>
187
+ <else-if type="thesis" match="any">
188
+ <group delimiter=", ">
189
+ <text variable="publisher"/>
190
+ <text variable="publisher-place"/>
191
+ </group>
192
+ </else-if>
193
+ <else>
194
+ <choose>
195
+ <if variable="event" match="none">
196
+ <text variable="genre" suffix=", "/>
197
+ </if>
198
+ </choose>
199
+ <group delimiter=": ">
200
+ <text variable="publisher-place"/>
201
+ <text variable="publisher"/>
202
+ </group>
203
+ </else>
204
+ </choose>
205
+ </macro>
206
+ <macro name="event">
207
+ <choose>
208
+ <if variable="event">
209
+ <choose>
210
+ <if variable="genre" match="none">
211
+ <text term="presented at" text-case="capitalize-first" suffix=" "/>
212
+ <text variable="event"/>
213
+ </if>
214
+ <else>
215
+ <group delimiter=" ">
216
+ <text variable="genre" text-case="capitalize-first"/>
217
+ <text term="presented at"/>
218
+ <text variable="event"/>
219
+ </group>
220
+ </else>
221
+ </choose>
222
+ </if>
223
+ </choose>
224
+ </macro>
225
+ <macro name="issued">
226
+ <choose>
227
+ <if variable="issued">
228
+ <group prefix=" (" suffix=").">
229
+ <date variable="issued">
230
+ <date-part name="year"/>
231
+ </date>
232
+ <choose>
233
+ <if type="bill book graphic legal_case motion_picture report song article-journal chapter paper-conference" match="none">
234
+ <date variable="issued">
235
+ <date-part prefix=", " name="month"/>
236
+ <date-part prefix=" " name="day"/>
237
+ </date>
238
+ </if>
239
+ </choose>
240
+ </group>
241
+ </if>
242
+ <else>
243
+ <group prefix=" (" suffix=").">
244
+ <text term="no date" form="short"/>
245
+ <text variable="year-suffix" prefix="-"/>
246
+ </group>
247
+ </else>
248
+ </choose>
249
+ </macro>
250
+ <macro name="issued-year">
251
+ <choose>
252
+ <if variable="issued">
253
+ <date variable="issued">
254
+ <date-part name="year"/>
255
+ </date>
256
+ <text variable="year-suffix"/>
257
+ </if>
258
+ <else>
259
+ <text term="no date" form="short"/>
260
+ <text variable="year-suffix" prefix="-"/>
261
+ </else>
262
+ </choose>
263
+ </macro>
264
+ <macro name="edition">
265
+ <choose>
266
+ <if is-numeric="edition">
267
+ <group delimiter=" ">
268
+ <number variable="edition" form="ordinal"/>
269
+ <text term="edition" form="short" suffix="." strip-periods="true"/>
270
+ </group>
271
+ </if>
272
+ <else>
273
+ <text variable="edition" suffix="."/>
274
+ </else>
275
+ </choose>
276
+ </macro>
277
+ <macro name="locators">
278
+ <choose>
279
+ <if type="article-journal article-magazine" match="any">
280
+ <group prefix=", " delimiter=", ">
281
+ <group>
282
+ <text variable="volume" font-style="italic"/>
283
+ <text variable="issue" prefix="(" suffix=")"/>
284
+ </group>
285
+ <text variable="page"/>
286
+ </group>
287
+ </if>
288
+ <else-if type="article-newspaper">
289
+ <group delimiter=" " prefix=", ">
290
+ <label variable="page" form="short"/>
291
+ <text variable="page"/>
292
+ </group>
293
+ </else-if>
294
+ <else-if type="bill book graphic legal_case motion_picture report song chapter paper-conference" match="any">
295
+ <group prefix=" (" suffix=")" delimiter=", ">
296
+ <text macro="edition"/>
297
+ <group>
298
+ <text term="volume" form="short" plural="true" text-case="capitalize-first" suffix=". " strip-periods="true"/>
299
+ <number variable="number-of-volumes" form="numeric" prefix="1-"/>
300
+ </group>
301
+ <group>
302
+ <text term="volume" form="short" text-case="capitalize-first" suffix=". " strip-periods="true"/>
303
+ <number variable="volume" form="numeric"/>
304
+ </group>
305
+ <group>
306
+ <label variable="page" form="short" suffix=" "/>
307
+ <text variable="page"/>
308
+ </group>
309
+ </group>
310
+ </else-if>
311
+ </choose>
312
+ </macro>
313
+ <macro name="citation-locator">
314
+ <group>
315
+ <label variable="locator" form="short"/>
316
+ <text variable="locator" prefix=" "/>
317
+ </group>
318
+ </macro>
319
+ <citation et-al-min="6" et-al-use-first="1" et-al-subsequent-min="3" et-al-subsequent-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true" collapse="year" givenname-disambiguation-rule="primary-name">
320
+ <sort>
321
+ <key macro="author"/>
322
+ <key macro="issued-year"/>
323
+ </sort>
324
+ <layout prefix="(" suffix=")" delimiter=", ">
325
+ <group delimiter=", ">
326
+ <text macro="author-short"/>
327
+ <text macro="issued-year"/>
328
+ <text macro="citation-locator"/>
329
+ </group>
330
+ </layout>
331
+ </citation>
332
+ <bibliography hanging-indent="true" et-al-min="8" et-al-use-first="7" entry-spacing="0" line-spacing="2">
333
+ <sort>
334
+ <key macro="author"/>
335
+ <key macro="issued-year" sort="ascending"/>
336
+ </sort>
337
+ <layout>
338
+ <group suffix=".">
339
+ <text macro="author" suffix="."/>
340
+ <text macro="issued"/>
341
+ <group delimiter=". ">
342
+ <text macro="title" prefix=" "/>
343
+ <group>
344
+ <text macro="container-contributors"/>
345
+ <text macro="secondary-contributors"/>
346
+ <group delimiter=", ">
347
+ <text variable="container-title" font-style="italic"/>
348
+ <text variable="collection-title"/>
349
+ </group>
350
+ </group>
351
+ </group>
352
+ <text macro="locators"/>
353
+ <group delimiter=", " prefix=". ">
354
+ <text macro="event"/>
355
+ <text macro="publisher"/>
356
+ </group>
357
+ </group>
358
+ <text macro="access" prefix=" "/>
359
+ </layout>
360
+ </bibliography>
361
+ </style>