citeproc-ruby 0.0.6 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.document +4 -0
  4. data/.gitignore +10 -0
  5. data/.rspec +3 -0
  6. data/.simplecov +4 -0
  7. data/.travis.yml +17 -0
  8. data/.yardopts +2 -0
  9. data/AGPL +662 -0
  10. data/BSDL +29 -0
  11. data/Gemfile +42 -0
  12. data/Guardfile +14 -0
  13. data/README.md +32 -76
  14. data/Rakefile +60 -0
  15. data/citeproc-ruby.gemspec +46 -0
  16. data/cucumber.yml +1 -0
  17. data/features/bibliography.feature +25 -0
  18. data/features/name_options.feature +37 -0
  19. data/features/names.feature +192 -0
  20. data/features/renderer.feature +74 -0
  21. data/features/sort.feature +50 -0
  22. data/features/step_definitions/renderer.rb +80 -0
  23. data/features/support/env.rb +33 -0
  24. data/features/support/hooks.rb +10 -0
  25. data/lib/citeproc/ruby.rb +32 -0
  26. data/lib/citeproc/ruby/engine.rb +122 -0
  27. data/lib/citeproc/ruby/format.rb +303 -0
  28. data/lib/citeproc/ruby/formats/default.rb +25 -0
  29. data/lib/citeproc/ruby/formats/html.rb +221 -0
  30. data/lib/citeproc/ruby/renderer.rb +140 -0
  31. data/lib/citeproc/ruby/renderer/choose.rb +106 -0
  32. data/lib/citeproc/ruby/renderer/date.rb +90 -0
  33. data/lib/citeproc/ruby/renderer/format.rb +129 -0
  34. data/lib/citeproc/ruby/renderer/group.rb +34 -0
  35. data/lib/citeproc/ruby/renderer/history.rb +40 -0
  36. data/lib/citeproc/ruby/renderer/label.rb +66 -0
  37. data/lib/citeproc/ruby/renderer/layout.rb +20 -0
  38. data/lib/citeproc/ruby/renderer/locale.rb +26 -0
  39. data/lib/citeproc/ruby/renderer/macro.rb +20 -0
  40. data/lib/citeproc/ruby/renderer/names.rb +401 -0
  41. data/lib/citeproc/ruby/renderer/number.rb +41 -0
  42. data/lib/citeproc/ruby/renderer/observer.rb +44 -0
  43. data/lib/citeproc/ruby/renderer/state.rb +96 -0
  44. data/lib/citeproc/ruby/renderer/text.rb +62 -0
  45. data/lib/citeproc/ruby/sort.rb +82 -0
  46. data/lib/citeproc/ruby/version.rb +5 -0
  47. data/spec/citeproc/ruby/engine_spec.rb +94 -0
  48. data/spec/citeproc/ruby/formats/default_spec.rb +159 -0
  49. data/spec/citeproc/ruby/formats/html_spec.rb +162 -0
  50. data/spec/citeproc/ruby/renderer/choose_spec.rb +293 -0
  51. data/spec/citeproc/ruby/renderer/date_spec.rb +173 -0
  52. data/spec/citeproc/ruby/renderer/group_spec.rb +88 -0
  53. data/spec/citeproc/ruby/renderer/history_spec.rb +38 -0
  54. data/spec/citeproc/ruby/renderer/label_spec.rb +225 -0
  55. data/spec/citeproc/ruby/renderer/layout_spec.rb +41 -0
  56. data/spec/citeproc/ruby/renderer/macro_spec.rb +31 -0
  57. data/spec/citeproc/ruby/renderer/names_spec.rb +396 -0
  58. data/spec/citeproc/ruby/renderer/number_spec.rb +120 -0
  59. data/spec/citeproc/ruby/renderer/text_spec.rb +120 -0
  60. data/spec/citeproc/ruby/renderer_spec.rb +65 -0
  61. data/spec/fixtures/items.rb +80 -0
  62. data/{resource/locale → spec/fixtures/locales}/locales-en-US.xml +2 -11
  63. data/{resource/locale → spec/fixtures/locales}/locales-fr-FR.xml +77 -66
  64. data/{resource/style → spec/fixtures/styles}/apa.csl +5 -5
  65. data/spec/spec_helper.rb +67 -14
  66. metadata +121 -211
  67. data/lib/citeproc.rb +0 -100
  68. data/lib/citeproc/bibliography.rb +0 -57
  69. data/lib/citeproc/data.rb +0 -149
  70. data/lib/citeproc/date.rb +0 -133
  71. data/lib/citeproc/formatter.rb +0 -38
  72. data/lib/citeproc/item.rb +0 -53
  73. data/lib/citeproc/name.rb +0 -284
  74. data/lib/citeproc/processor.rb +0 -166
  75. data/lib/citeproc/selector.rb +0 -61
  76. data/lib/citeproc/variable.rb +0 -82
  77. data/lib/citeproc/version.rb +0 -3
  78. data/lib/csl/locale.rb +0 -223
  79. data/lib/csl/node.rb +0 -72
  80. data/lib/csl/nodes.rb +0 -1418
  81. data/lib/csl/renderer.rb +0 -88
  82. data/lib/csl/sort.rb +0 -61
  83. data/lib/csl/style.rb +0 -110
  84. data/lib/csl/term.rb +0 -124
  85. data/lib/extensions/core.rb +0 -43
  86. data/lib/plugins/filters/bibtex.rb +0 -12
  87. data/lib/plugins/formats/default.rb +0 -134
  88. data/lib/plugins/formats/html.rb +0 -67
  89. data/lib/support/attributes.rb +0 -99
  90. data/lib/support/compatibility.rb +0 -83
  91. data/lib/support/tree.rb +0 -80
  92. data/resource/locale/locales-af-ZA.xml +0 -305
  93. data/resource/locale/locales-ar-AR.xml +0 -306
  94. data/resource/locale/locales-bg-BG.xml +0 -305
  95. data/resource/locale/locales-ca-AD.xml +0 -305
  96. data/resource/locale/locales-cs-CZ.xml +0 -305
  97. data/resource/locale/locales-da-DK.xml +0 -305
  98. data/resource/locale/locales-de-AT.xml +0 -304
  99. data/resource/locale/locales-de-CH.xml +0 -304
  100. data/resource/locale/locales-de-DE.xml +0 -332
  101. data/resource/locale/locales-el-GR.xml +0 -305
  102. data/resource/locale/locales-en-GB.xml +0 -304
  103. data/resource/locale/locales-es-ES.xml +0 -305
  104. data/resource/locale/locales-et-EE.xml +0 -304
  105. data/resource/locale/locales-eu.xml +0 -305
  106. data/resource/locale/locales-fa-IR.xml +0 -304
  107. data/resource/locale/locales-fi-FI.xml +0 -304
  108. data/resource/locale/locales-fr-CA.xml +0 -306
  109. data/resource/locale/locales-he-IL.xml +0 -304
  110. data/resource/locale/locales-hu-HU.xml +0 -305
  111. data/resource/locale/locales-is-IS.xml +0 -304
  112. data/resource/locale/locales-it-IT.xml +0 -305
  113. data/resource/locale/locales-ja-JP.xml +0 -305
  114. data/resource/locale/locales-kh-KH.xml +0 -303
  115. data/resource/locale/locales-km-KH.xml +0 -304
  116. data/resource/locale/locales-ko-KR.xml +0 -305
  117. data/resource/locale/locales-mn-MN.xml +0 -306
  118. data/resource/locale/locales-nb-NO.xml +0 -304
  119. data/resource/locale/locales-nl-NL.xml +0 -304
  120. data/resource/locale/locales-nn-NO.xml +0 -304
  121. data/resource/locale/locales-pl-PL.xml +0 -305
  122. data/resource/locale/locales-pt-BR.xml +0 -304
  123. data/resource/locale/locales-pt-PT.xml +0 -305
  124. data/resource/locale/locales-ro-RO.xml +0 -305
  125. data/resource/locale/locales-ru-RU.xml +0 -306
  126. data/resource/locale/locales-sk-SK.xml +0 -304
  127. data/resource/locale/locales-sl-SI.xml +0 -305
  128. data/resource/locale/locales-sr-RS.xml +0 -305
  129. data/resource/locale/locales-sv-SE.xml +0 -305
  130. data/resource/locale/locales-th-TH.xml +0 -304
  131. data/resource/locale/locales-tr-TR.xml +0 -305
  132. data/resource/locale/locales-uk-UA.xml +0 -306
  133. data/resource/locale/locales-vi-VN.xml +0 -305
  134. data/resource/locale/locales-zh-CN.xml +0 -304
  135. data/resource/locale/locales-zh-TW.xml +0 -305
  136. data/resource/schema/csl-categories.rnc +0 -39
  137. data/resource/schema/csl-data.rnc +0 -98
  138. data/resource/schema/csl-terms.rnc +0 -106
  139. data/resource/schema/csl-types.rnc +0 -39
  140. data/resource/schema/csl-variables.rnc +0 -182
  141. data/resource/schema/csl.rnc +0 -941
  142. data/resource/style/bibtex.csl +0 -177
  143. data/resource/style/chicago-annotated-bibliography.csl +0 -513
  144. data/resource/style/chicago-author-date-basque.csl +0 -707
  145. data/resource/style/chicago-author-date-de.csl +0 -394
  146. data/resource/style/chicago-author-date-listing.csl +0 -434
  147. data/resource/style/chicago-author-date.csl +0 -425
  148. data/resource/style/chicago-dated-note-biblio-no-ibid.csl +0 -472
  149. data/resource/style/chicago-fullnote-bibliography-bb.csl +0 -928
  150. data/resource/style/chicago-fullnote-bibliography-delimiter-fixes.csl +0 -972
  151. data/resource/style/chicago-fullnote-bibliography-no-ibid-delimiter-fixes.csl +0 -963
  152. data/resource/style/chicago-fullnote-bibliography-no-ibid.csl +0 -785
  153. data/resource/style/chicago-fullnote-bibliography.csl +0 -803
  154. data/resource/style/chicago-library-list.csl +0 -511
  155. data/resource/style/chicago-note-biblio-no-ibid.csl +0 -514
  156. data/resource/style/chicago-note-bibliography.csl +0 -530
  157. data/resource/style/chicago-note.csl +0 -388
  158. data/resource/style/chicago-quick-copy.csl +0 -685
  159. data/resource/style/ieee.csl +0 -299
  160. data/resource/style/mla-notes.csl +0 -796
  161. data/resource/style/mla-underline.csl +0 -175
  162. data/resource/style/mla-url.csl +0 -214
  163. data/resource/style/mla.csl +0 -394
  164. data/resource/style/vancouver-brackets.csl +0 -256
  165. data/resource/style/vancouver-superscript-bracket-only-year.csl +0 -165
  166. data/resource/style/vancouver-superscript.csl +0 -256
  167. data/resource/style/vancouver.csl +0 -256
  168. data/spec/citeproc/bibliography_spec.rb +0 -45
  169. data/spec/citeproc/citeproc_spec.rb +0 -80
  170. data/spec/citeproc/date_spec.rb +0 -89
  171. data/spec/citeproc/formatter_spec.rb +0 -101
  172. data/spec/citeproc/item_spec.rb +0 -71
  173. data/spec/citeproc/name_spec.rb +0 -30
  174. data/spec/citeproc/processor_spec.rb +0 -61
  175. data/spec/citeproc/selector_spec.rb +0 -82
  176. data/spec/citeproc/variable_spec.rb +0 -69
  177. data/spec/csl/locale_spec.rb +0 -208
  178. data/spec/csl/node_spec.rb +0 -25
  179. data/spec/csl/nodes_spec.rb +0 -145
  180. data/spec/csl/style_spec.rb +0 -62
  181. data/spec/csl/term_spec.rb +0 -56
  182. data/spec/fixtures/dates.yaml +0 -80
  183. data/spec/fixtures/names.yaml +0 -115
  184. data/spec/fixtures/nodes.yaml +0 -245
  185. data/spec/support/attributes_spec.rb +0 -39
  186. data/spec/support/tree_spec.rb +0 -163
@@ -1,928 +0,0 @@
1
- <style
2
- xmlns="http://purl.org/net/xbiblio/csl"
3
- class="note"
4
- version="1.0"
5
- default-locale="en-US-x-sort-ja-alalc97-x-sec-en-x-name-ja-alalc97">
6
- <info>
7
- <title>Chicago Manual of Style (Full Note with Bibliography + Bluebook)</title>
8
- <id>http://www.zotero.org/styles/chicago-fullnote-bibliography-bb</id>
9
- <link rel="self" href="http://www.zotero.org/styles/chicago-fullnote-bibliography-bb" />
10
- <link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation" />
11
- <author>
12
- <name>Julian Onions</name>
13
- <email>julian.onions@gmail.com</email>
14
- </author>
15
- <contributor>
16
- <name>Simon Kornblith</name>
17
- <email>simon@simonster.com</email>
18
- </contributor>
19
- <contributor>
20
- <name>Elena Razlogova</name>
21
- <email>elena.razlogova@gmail.com</email>
22
- </contributor>
23
- <summary>Chicago format with full notes and bibliography</summary>
24
- <category field="generic-base" />
25
- <category citation-format="numeric" />
26
- <updated>2009-08-10T04:49:00+09:00</updated>
27
- </info>
28
- <macro name="editor-translator">
29
- <group delimiter=", ">
30
- <choose>
31
- <if variable="author">
32
- <names delimiter=", " variable="editor">
33
- <label form="verb-short" suffix=". " text-case="lowercase" />
34
- <name and="text" delimiter=", " />
35
- </names>
36
- </if>
37
- </choose>
38
- <choose>
39
- <if match="any" variable="author editor">
40
- <names delimiter=", " variable="translator">
41
- <label form="verb-short" suffix=". " text-case="lowercase" />
42
- <name and="text" delimiter=", " />
43
- </names>
44
- </if>
45
- </choose>
46
- </group>
47
- </macro>
48
- <macro name="secondary-contributors-note">
49
- <choose>
50
- <if match="none" type="chapter">
51
- <text macro="editor-translator" />
52
- </if>
53
- </choose>
54
- </macro>
55
- <macro name="container-contributors-note">
56
- <choose>
57
- <if type="chapter">
58
- <text macro="editor-translator" />
59
- </if>
60
- </choose>
61
- </macro>
62
- <macro name="secondary-contributors">
63
- <choose>
64
- <if match="none" type="chapter">
65
- <group delimiter=". ">
66
- <choose>
67
- <if variable="author">
68
- <names delimiter=". " variable="editor">
69
- <label form="verb" prefix=" " suffix=" " text-case="capitalize-first" />
70
- <name and="text" delimiter=", " />
71
- </names>
72
- </if>
73
- </choose>
74
- <choose>
75
- <if match="any" variable="author editor">
76
- <names delimiter=". " variable="translator">
77
- <label form="verb" prefix=" " suffix=" " text-case="capitalize-first" />
78
- <name and="text" delimiter=", " />
79
- </names>
80
- </if>
81
- </choose>
82
- </group>
83
- </if>
84
- </choose>
85
- </macro>
86
- <macro name="container-contributors">
87
- <choose>
88
- <if type="chapter">
89
- <group delimiter=", ">
90
- <choose>
91
- <if variable="author">
92
- <names delimiter=", " variable="editor">
93
- <label form="verb" suffix=" " text-case="lowercase" />
94
- <name and="text" delimiter=", " />
95
- </names>
96
- </if>
97
- </choose>
98
- <choose>
99
- <if match="any" variable="author editor">
100
- <names delimiter=", " variable="translator">
101
- <label form="verb" suffix=" " text-case="lowercase" />
102
- <name and="text" delimiter=", " />
103
- </names>
104
- </if>
105
- </choose>
106
- </group>
107
- </if>
108
- </choose>
109
- </macro>
110
- <macro name="editor-note">
111
- <names variable="editor">
112
- <name and="text" delimiter=", " sort-separator=", " />
113
- <label form="short" prefix=", " suffix="." />
114
- </names>
115
- </macro>
116
- <macro name="translator-note">
117
- <names variable="translator">
118
- <name and="text" delimiter=", " sort-separator=", " />
119
- <label form="verb-short" prefix=", " suffix="." />
120
- </names>
121
- </macro>
122
- <macro name="recipient-note">
123
- <names delimiter=", " variable="recipient">
124
- <label form="verb" prefix=" " suffix=" " text-case="lowercase" />
125
- <name and="text" delimiter=", " />
126
- </names>
127
- </macro>
128
- <macro name="contributors-note">
129
- <names variable="author">
130
- <name and="text" delimiter=", " sort-separator=", " />
131
- <substitute>
132
- <text macro="editor-note" />
133
- <text macro="translator-note" />
134
- </substitute>
135
- </names>
136
- <text macro="recipient-note" />
137
- </macro>
138
- <macro name="editor">
139
- <names variable="editor">
140
- <name and="text" delimiter=", " delimiter-precedes-last="always" name-as-sort-order="first" sort-separator=", " />
141
- <label form="short" prefix=", " suffix="." />
142
- </names>
143
- </macro>
144
- <macro name="translator">
145
- <names variable="translator">
146
- <name and="text" delimiter=", " delimiter-precedes-last="always" name-as-sort-order="first" sort-separator=", " />
147
- <label form="verb-short" prefix=", " suffix="." />
148
- </names>
149
- </macro>
150
- <macro name="recipient">
151
- <choose>
152
- <if type="personal_communication">
153
- <choose>
154
- <if variable="genre">
155
- <text text-case="capitalize-first" variable="genre" />
156
- </if>
157
- <else>
158
- <text term="letter" text-case="capitalize-first" />
159
- </else>
160
- </choose>
161
- </if>
162
- </choose>
163
- <text macro="recipient-note" prefix=" " />
164
- </macro>
165
- <macro name="contributors">
166
- <names variable="author">
167
- <name and="text" delimiter=", " delimiter-precedes-last="always" name-as-sort-order="first" sort-separator=", " />
168
- <substitute>
169
- <text macro="editor" />
170
- <text macro="translator" />
171
- </substitute>
172
- </names>
173
- <text macro="recipient" prefix=". " />
174
- </macro>
175
- <macro name="recipient-short">
176
- <names variable="recipient">
177
- <label form="verb" prefix=" " suffix=" " text-case="lowercase" />
178
- <name and="text" delimiter=", " form="short" />
179
- </names>
180
- </macro>
181
- <macro name="contributors-short">
182
- <names variable="author">
183
- <name and="text" delimiter=", " form="short" />
184
- <substitute>
185
- <names variable="editor" />
186
- <names variable="translator" />
187
- </substitute>
188
- </names>
189
- <text macro="recipient-short" />
190
- </macro>
191
- <macro name="contributors-sort">
192
- <names variable="author">
193
- <name and="text" delimiter=", " delimiter-precedes-last="always" name-as-sort-order="all" sort-separator=", " />
194
- <label form="verb-short" prefix=", " suffix="." />
195
- <substitute>
196
- <names variable="editor" />
197
- <names variable="translator" />
198
- </substitute>
199
- </names>
200
- </macro>
201
- <macro name="interviewer-note">
202
- <names delimiter=", " variable="interviewer">
203
- <label form="verb" prefix=" " suffix=" " text-case="lowercase" />
204
- <name and="text" delimiter=", " />
205
- </names>
206
- </macro>
207
- <macro name="interviewer">
208
- <names delimiter=", " variable="interviewer">
209
- <label form="verb" prefix=" " suffix=" " text-case="capitalize-first" />
210
- <name and="text" delimiter=", " />
211
- </names>
212
- </macro>
213
- <macro name="title-note">
214
- <choose>
215
- <if match="none" variable="title">
216
- <text variable="genre" />
217
- </if>
218
- <else-if type="book">
219
- <text font-style="italic" variable="title" />
220
- </else-if>
221
- <else>
222
- <text quotes="true" variable="title" />
223
- </else>
224
- </choose>
225
- </macro>
226
- <macro name="title">
227
- <choose>
228
- <if match="none" variable="title">
229
- <choose>
230
- <if match="none" type="personal_communication">
231
- <text text-case="capitalize-first" variable="genre" />
232
- </if>
233
- </choose>
234
- </if>
235
- <else-if type="book">
236
- <text font-style="italic" variable="title" />
237
- </else-if>
238
- <else>
239
- <text quotes="true" variable="title" />
240
- </else>
241
- </choose>
242
- </macro>
243
- <macro name="title-short">
244
- <choose>
245
- <if match="none" variable="title">
246
- <choose>
247
- <if type="interview">
248
- <text term="interview" text-case="lowercase" />
249
- </if>
250
- <else-if match="any" type="manuscript speech">
251
- <text form="short" variable="genre" />
252
- </else-if>
253
- <else-if type="personal_communication">
254
- <text macro="issued" />
255
- </else-if>
256
- </choose>
257
- </if>
258
- <else-if type="book">
259
- <text font-style="italic" form="short" variable="title" />
260
- </else-if>
261
- <else>
262
- <text form="short" quotes="true" variable="title" />
263
- </else>
264
- </choose>
265
- </macro>
266
- <macro name="description-note">
267
- <group delimiter=", ">
268
- <text macro="interviewer-note" />
269
- <text variable="medium" />
270
- <choose>
271
- <if match="none" variable="title"> </if>
272
- <else-if match="any" type="thesis speech"> </else-if>
273
- <else>
274
- <text variable="genre" />
275
- </else>
276
- </choose>
277
- </group>
278
- </macro>
279
- <macro name="description">
280
- <group delimiter=", ">
281
- <group delimiter=". ">
282
- <text macro="interviewer" />
283
- <text text-case="capitalize-first" variable="medium" />
284
- </group>
285
- <choose>
286
- <if match="none" variable="title"> </if>
287
- <else-if match="any" type="thesis speech"> </else-if>
288
- <else>
289
- <text text-case="capitalize-first" variable="genre" />
290
- </else>
291
- </choose>
292
- </group>
293
- </macro>
294
- <macro name="container-title-note">
295
- <choose>
296
- <if type="chapter">
297
- <text suffix=" " term="in" text-case="lowercase" />
298
- </if>
299
- </choose>
300
- <text font-style="italic" variable="container-title" />
301
- </macro>
302
- <macro name="container-title">
303
- <choose>
304
- <if type="chapter">
305
- <text suffix=" " term="in" text-case="capitalize-first" />
306
- </if>
307
- </choose>
308
- <text font-style="italic" variable="container-title" />
309
- </macro>
310
- <macro name="collection-title">
311
- <text variable="collection-title" />
312
- <text prefix=" " variable="collection-number" />
313
- </macro>
314
- <macro name="edition-note">
315
- <choose>
316
- <if match="any" type="book chapter">
317
- <choose>
318
- <if is-numeric="edition">
319
- <group delimiter=" ">
320
- <number form="ordinal" variable="edition" />
321
- <text form="short" suffix="." term="edition" />
322
- </group>
323
- </if>
324
- <else>
325
- <text suffix="." variable="edition" />
326
- </else>
327
- </choose>
328
- </if>
329
- </choose>
330
- </macro>
331
- <macro name="edition">
332
- <choose>
333
- <if match="any" type="book chapter">
334
- <choose>
335
- <if is-numeric="edition">
336
- <group delimiter=" ">
337
- <number form="ordinal" variable="edition" />
338
- <text form="short" suffix="." term="edition" />
339
- </group>
340
- </if>
341
- <else>
342
- <text suffix="." text-case="capitalize-first" variable="edition" />
343
- </else>
344
- </choose>
345
- </if>
346
- </choose>
347
- </macro>
348
- <macro name="locators-note">
349
- <choose>
350
- <if type="article-journal">
351
- <text prefix=" " variable="volume" />
352
- <text prefix=", no. " variable="issue" />
353
- </if>
354
- <else-if match="any" type="book chapter">
355
- <group delimiter=", " prefix=", ">
356
- <group>
357
- <text form="short" suffix=". " term="volume" />
358
- <number form="numeric" variable="volume" />
359
- </group>
360
- <choose>
361
- <if match="none" variable="locator">
362
- <group>
363
- <number form="numeric" variable="number-of-volumes" />
364
- <text form="short" plural="true" prefix=" " suffix="." term="volume" />
365
- </group>
366
- </if>
367
- </choose>
368
- <text macro="edition-note" />
369
- </group>
370
- </else-if>
371
- </choose>
372
- </macro>
373
- <macro name="locators">
374
- <choose>
375
- <if type="article-journal">
376
- <text prefix=" " variable="volume" />
377
- <text prefix=", no. " variable="issue" />
378
- </if>
379
- <else-if match="any" type="book">
380
- <group delimiter=". " prefix=". ">
381
- <group>
382
- <text form="short" suffix=". " term="volume" text-case="capitalize-first" />
383
- <number form="numeric" variable="volume" />
384
- </group>
385
- <group>
386
- <number form="numeric" variable="number-of-volumes" />
387
- <text form="short" plural="true" prefix=" " suffix="." term="volume" />
388
- </group>
389
- <text macro="edition" />
390
- </group>
391
- </else-if>
392
- </choose>
393
- </macro>
394
- <macro name="locators-newspaper">
395
- <choose>
396
- <if type="article-newspaper">
397
- <group delimiter=", ">
398
- <group>
399
- <text suffix=" " variable="edition" />
400
- <text prefix=" " term="edition" />
401
- </group>
402
- <group>
403
- <text form="short" suffix=". " term="section" />
404
- <text variable="section" />
405
- </group>
406
- </group>
407
- </if>
408
- </choose>
409
- </macro>
410
- <macro name="event">
411
- <group>
412
- <text suffix=" " term="presented at" />
413
- <text variable="event" />
414
- </group>
415
- </macro>
416
- <macro name="publisher">
417
- <group delimiter=": ">
418
- <text variable="publisher-place" />
419
- <text variable="publisher" />
420
- </group>
421
- </macro>
422
- <macro name="issued">
423
- <choose>
424
- <if match="any" type="graphic report">
425
- <date variable="issued">
426
- <date-part name="month" suffix=" " />
427
- <date-part name="day" suffix=", " />
428
- <date-part name="year" />
429
- </date>
430
- </if>
431
- <else-if match="any" type="book chapter thesis">
432
- <date variable="issued">
433
- <date-part name="year" />
434
- </date>
435
- </else-if>
436
- <else>
437
- <date variable="issued">
438
- <date-part name="month" suffix=" " />
439
- <date-part name="day" suffix=", " />
440
- <date-part name="year" />
441
- </date>
442
- </else>
443
- </choose>
444
- </macro>
445
- <macro name="point-locators-subsequent">
446
- <group>
447
- <choose>
448
- <if locator="page" match="none">
449
- <label form="short" suffix=" " variable="locator" />
450
- </if>
451
- </choose>
452
- <text variable="locator" />
453
- </group>
454
- </macro>
455
- <macro name="point-locators">
456
- <choose>
457
- <if match="none" variable="locator">
458
- <text macro="pages" />
459
- </if>
460
- <else-if type="article-journal">
461
- <text prefix=": " variable="locator" />
462
- </else-if>
463
- <else>
464
- <text macro="point-locators-subsequent" prefix=", " />
465
- </else>
466
- </choose>
467
- </macro>
468
- <macro name="pages">
469
- <choose>
470
- <if type="article-journal">
471
- <text prefix=": " variable="page" />
472
- </if>
473
- <else-if type="chapter">
474
- <text prefix=", " variable="page" />
475
- </else-if>
476
- </choose>
477
- </macro>
478
- <macro name="locators-chapter">
479
- <choose>
480
- <if type="chapter">
481
- <text suffix=":" variable="volume" />
482
- <text variable="page" />
483
- </if>
484
- </choose>
485
- </macro>
486
- <macro name="locators-journal">
487
- <choose>
488
- <if type="article-journal">
489
- <text prefix=": " variable="page" />
490
- </if>
491
- </choose>
492
- </macro>
493
- <macro name="archive-note">
494
- <group delimiter=", ">
495
- <text variable="archive_location" />
496
- <text variable="archive" />
497
- <text variable="archive-place" />
498
- </group>
499
- </macro>
500
- <macro name="archive">
501
- <group delimiter=". ">
502
- <text text-case="capitalize-first" variable="archive_location" />
503
- <text variable="archive" />
504
- <text variable="archive-place" />
505
- </group>
506
- </macro>
507
- <macro name="issue-note">
508
- <choose>
509
- <if type="article-journal">
510
- <text macro="issued" prefix=" (" suffix=")" />
511
- </if>
512
- <else-if match="any" variable="publisher-place publisher">
513
- <group delimiter=", " prefix=" (" suffix=")">
514
- <group delimiter=" ">
515
- <choose>
516
- <if match="none" variable="title"> </if>
517
- <else-if match="any" type="thesis speech">
518
- <text variable="genre" />
519
- </else-if>
520
- </choose>
521
- <text macro="event" />
522
- </group>
523
- <text macro="publisher" />
524
- <text macro="issued" />
525
- </group>
526
- </else-if>
527
- <else>
528
- <text macro="issued" prefix=", " />
529
- </else>
530
- </choose>
531
- </macro>
532
- <macro name="issue">
533
- <choose>
534
- <if type="article-journal">
535
- <text macro="issued" prefix=" (" suffix=")" />
536
- </if>
537
- <else-if type="speech">
538
- <choose>
539
- <if match="none" variable="title"> </if>
540
- <else>
541
- <text prefix=". " text-case="capitalize-first" variable="genre" />
542
- </else>
543
- </choose>
544
- <text macro="event" prefix=" " />
545
- <text prefix=", " variable="event-place" />
546
- <text macro="issued" prefix=", " />
547
- </else-if>
548
- <else-if match="any" variable="publisher-place publisher">
549
- <group delimiter=", " prefix=". ">
550
- <choose>
551
- <if type="thesis">
552
- <text text-case="capitalize-first" variable="genre" />
553
- </if>
554
- </choose>
555
- <text macro="publisher" />
556
- <text macro="issued" />
557
- </group>
558
- </else-if>
559
- <else>
560
- <text macro="issued" prefix=", " />
561
- </else>
562
- </choose>
563
- </macro>
564
- <macro name="access-note">
565
- <group delimiter=", ">
566
- <choose>
567
- <if match="any" type="graphic report">
568
- <text macro="archive-note" />
569
- </if>
570
- <else-if match="none" type="book thesis chapter article-journal article-newspaper article-magazine">
571
- <text macro="archive-note" />
572
- </else-if>
573
- </choose>
574
- <text prefix="doi:" variable="DOI" />
575
- <text variable="URL" />
576
- </group>
577
- </macro>
578
- <macro name="access">
579
- <group delimiter=". ">
580
- <choose>
581
- <if match="any" type="graphic report">
582
- <text macro="archive" />
583
- </if>
584
- <else-if match="none" type="book thesis chapter article-journal article-newspaper article-magazine">
585
- <text macro="archive" />
586
- </else-if>
587
- </choose>
588
- <text variable="URL" />
589
- </group>
590
- </macro>
591
- <macro name="sort-key">
592
- <text macro="contributors-sort" suffix=" " />
593
- <text suffix=" " variable="title" />
594
- <text variable="genre" />
595
- </macro>
596
- <!-- ### BLUEBOOK AUTHOR ### -->
597
- <macro name="bb-author">
598
- <names variable="author">
599
- <name/>
600
- </names>
601
- </macro>
602
- <macro name="bb-author-short">
603
- <names variable="author">
604
- <name form="short"/>
605
- </names>
606
- </macro>
607
-
608
- <!-- ### BLUEBOOK ISSUED ### -->
609
- <macro name="bb-issued">
610
- <group prefix="(" suffix=")">
611
- <date variable="issued" form="text" date-parts="year"/>
612
- </group>
613
- </macro>
614
-
615
- <!-- ### ID BACKREFERENCES ### -->
616
- <macro name="bb-ibid">
617
- <choose>
618
- <if position="ibid-with-locator">
619
- <group delimiter=" ">
620
- <choose>
621
- <if locator="page">
622
- <group delimiter=" ">
623
- <text term="ibid" font-style="italic"/>
624
- <text value="at"/>
625
- </group>
626
- </if>
627
- <else>
628
- <text term="ibid" font-style="italic" suffix=","/>
629
- <label form="short" variable="locator"/>
630
- </else>
631
- </choose>
632
- <text variable="locator"/>
633
- </group>
634
- </if>
635
- <else-if position="ibid">
636
- <text term="ibid" font-style="italic"/>
637
- </else-if>
638
- </choose>
639
- </macro>
640
-
641
- <!-- ### POINT LOCATORS -->
642
- <macro name="bb-point-locator-comma">
643
- <group delimiter=" ">
644
- <choose>
645
- <if variable="number page" position="ibid" match="any">
646
- <text value=","/>
647
- </if>
648
- </choose>
649
- <choose>
650
- <if locator="page" match="none">
651
- <label form="symbol" variable="locator" suffix=" "/>
652
- </if>
653
- </choose>
654
- <text variable="locator"/>
655
- </group>
656
- </macro>
657
- <macro name="bb-point-locator-base">
658
- <choose>
659
- <if locator="page" match="none">
660
- <label form="symbol" variable="locator" suffix=" "/>
661
- </if>
662
- </choose>
663
- <text variable="locator"/>
664
- </macro>
665
-
666
- <!-- ### LEGAL CASE ### -->
667
- <macro name="bb-legal-case">
668
- <choose>
669
- <if position="first">
670
- <text macro="bb-legal-case-first"/>
671
- </if>
672
- <else-if position="ibid">
673
- <text macro="bb-ibid"/>
674
- </else-if>
675
- <else-if position="near-note">
676
- <text macro="bb-legal-case-subsequent"/>
677
- </else-if>
678
- <else>
679
- <text macro="bb-legal-case-first"/>
680
- </else>
681
- </choose>
682
- </macro>
683
- <macro name="bb-legal-case-first">
684
- <choose>
685
- <if variable="title">
686
- <!-- Common law cases -->
687
- <group delimiter=", ">
688
- <text variable="title"/>
689
- <group delimiter=" ">
690
- <choose>
691
- <if variable="issue">
692
- <text variable="volume" prefix="[" suffix="]"/>
693
- <text variable="issue"/>
694
- </if>
695
- <else>
696
- <text variable="volume"/>
697
- </else>
698
- </choose>
699
- <text variable="container-title" form="short"/>
700
- <group>
701
- <text variable="page"/>
702
- <text macro="bb-point-locator-comma"/>
703
- </group>
704
- <group prefix="(" suffix=")" delimiter=" ">
705
- <text variable="authority" form="short"/>
706
- <date variable="issued">
707
- <date-part name="year"/>
708
- </date>
709
- </group>
710
- </group>
711
- </group>
712
- </if>
713
- <else>
714
- <!-- Civil law cases -->
715
- <group delimiter=", ">
716
- <text variable="authority"/>
717
- <text variable="title" form="short"/>
718
- <date variable="issued" form="text"/>
719
- <text variable="container-title" font-style="italic" strip-periods="true"/>
720
- <text variable="volume"/>
721
- <group delimiter=" ">
722
- <text variable="section"/>
723
- <label variable="page" form="short"/>
724
- <text variable="page"/>
725
- </group>
726
- <text variable="number"/>
727
- <group delimiter=" ">
728
- <text variable="genre"/>
729
- <names variable="author">
730
- <name initialize-with="." font-variant="small-caps"/>
731
- </names>
732
- </group>
733
- </group>
734
- </else>
735
- </choose>
736
- </macro>
737
- <macro name="bb-legal-case-subsequent">
738
- <group delimiter=", ">
739
- <text variable="title" form="short"/>
740
- <group delimiter=" ">
741
- <choose>
742
- <if variable="issue">
743
- <text variable="volume" prefix="[" suffix="]"/>
744
- <text variable="issue"/>
745
- </if>
746
- <else>
747
- <text variable="volume"/>
748
- </else>
749
- </choose>
750
- <text variable="container-title" form="short"/>
751
- <choose>
752
- <if variable="locator">
753
- <text macro="bb-point-locator-base"/>
754
- </if>
755
- <else>
756
- <text variable="page"/>
757
- </else>
758
- </choose>
759
- </group>
760
- </group>
761
- </macro>
762
-
763
- <!-- ### LEGISLATION ### -->
764
- <macro name="bb-legislation">
765
- <choose>
766
- <if position="first">
767
- <text macro="bb-legislation-first"/>
768
- </if>
769
- <else-if position="near-note">
770
- <text macro="bb-legislation-subsequent"/>
771
- </else-if>
772
- <else>
773
- <text macro="bb-legislation-first"/>
774
- </else>
775
- </choose>
776
- </macro>
777
- <macro name="bb-legislation-first">
778
- <choose>
779
- <if variable="container-title">
780
- <text macro="bb-statute-first"/>
781
- </if>
782
- <else>
783
- <text macro="bb-code-first"/>
784
- </else>
785
- </choose>
786
- </macro>
787
- <macro name="bb-legislation-subsequent">
788
- <choose>
789
- <if variable="container-title">
790
- <text macro="bb-statute-subsequent"/>
791
- </if>
792
- <else>
793
- <text macro="bb-code-subsequent"/>
794
- </else>
795
- </choose>
796
- </macro>
797
- <macro name="bb-statute-first">
798
- <group delimiter=", ">
799
- <text variable="title"/>
800
- <text macro="bb-statute-subsequent"/>
801
- </group>
802
- </macro>
803
- <macro name="bb-statute-subsequent">
804
- <group delimiter="">
805
- <group delimiter=" ">
806
- <text variable="volume"/>
807
- <text variable="container-title"/>
808
- <text variable="number"/>
809
- <text variable="page"/>
810
- <choose>
811
- <if is-numeric="section">
812
- <text term="section" form="symbol"/>
813
- <text variable="section"/>
814
- </if>
815
- </choose>
816
- </group>
817
- <text macro="bb-point-locator-comma"/>
818
- <date prefix=" (" variable="issued" date-parts="year" form="text" suffix=")"/>
819
- </group>
820
- </macro>
821
- <macro name="bb-code-first">
822
- <group delimiter=" ">
823
- <text variable="title" font-variant="small-caps"/>
824
- <group delimiter=" ">
825
- <label variable="locator" form="symbol"/>
826
- <text variable="locator"/>
827
- </group>
828
- </group>
829
- </macro>
830
- <macro name="bb-code-subsequent">
831
- <group delimiter=" ">
832
- <text variable="title" form="short" font-variant="small-caps"/>
833
- <group delimiter=" ">
834
- <label variable="locator" form="symbol"/>
835
- <text variable="locator"/>
836
- </group>
837
- </group>
838
- </macro>
839
- <citation
840
- disambiguate-add-names="true"
841
- et-al-min="4"
842
- et-al-subsequent-min="4"
843
- et-al-subsequent-use-first="1"
844
- et-al-use-first="1">
845
- <layout delimiter="; " prefix="" suffix=".">
846
- <choose>
847
- <if type="legal_case">
848
- <text macro="bb-legal-case"/>
849
- </if>
850
- <else-if type="legislation">
851
- <text macro="bb-legislation"/>
852
- </else-if>
853
- <else-if position="ibid-with-locator">
854
- <group delimiter=", ">
855
- <text suffix="." term="ibid" text-case="capitalize-first" />
856
- <text macro="point-locators-subsequent" />
857
- </group>
858
- </else-if>
859
- <else-if position="ibid">
860
- <text suffix="." term="ibid" text-case="capitalize-first" />
861
- </else-if>
862
- <else-if position="subsequent">
863
- <group delimiter=", ">
864
- <text macro="contributors-short" />
865
- <text macro="title-short" />
866
- <text macro="point-locators-subsequent" />
867
- </group>
868
- </else-if>
869
- <else>
870
- <group delimiter=", ">
871
- <text macro="contributors-note" />
872
- <text macro="title-note" />
873
- <text macro="description-note" />
874
- <text macro="secondary-contributors-note" />
875
- <text macro="container-title-note" />
876
- <text macro="container-contributors-note" />
877
- </group>
878
- <text macro="locators-note" />
879
- <text macro="collection-title" prefix=", " />
880
- <text macro="issue-note" />
881
- <text macro="locators-newspaper" prefix=", " />
882
- <text macro="point-locators" />
883
- <text macro="access-note" prefix=", " />
884
- </else>
885
- </choose>
886
- </layout>
887
- </citation>
888
- <bibliography
889
- entry-spacing="0"
890
- et-al-min="11"
891
- et-al-use-first="7"
892
- hanging-indent="true"
893
- subsequent-author-substitute="---">
894
- <sort>
895
- <key macro="sort-key" />
896
- <key variable="issued" />
897
- </sort>
898
- <layout suffix=".">
899
- <choose>
900
- <if type="legal_case">
901
- <text macro="bb-legal-case-first"/>
902
- </if>
903
- <else-if type="legislation">
904
- <text macro="bb-legislation-first"/>
905
- </else-if>
906
- <else>
907
- <group delimiter=". ">
908
- <text macro="contributors" />
909
- <text macro="title" />
910
- <text macro="description" />
911
- <text macro="secondary-contributors" />
912
- <group delimiter=", ">
913
- <text macro="container-title" />
914
- <text macro="container-contributors" />
915
- <text macro="locators-chapter" />
916
- </group>
917
- </group>
918
- <text macro="locators" />
919
- <text macro="collection-title" prefix=". " />
920
- <text macro="issue" />
921
- <text macro="locators-newspaper" prefix=", " />
922
- <text macro="locators-journal" />
923
- <text macro="access" prefix=". " />
924
- </else>
925
- </choose>
926
- </layout>
927
- </bibliography>
928
- </style>