citeproc-ruby 0.0.6 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
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,803 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" demote-non-dropping-particle="sort-only">
3
- <info>
4
- <title>Chicago Manual of Style (full note)</title>
5
- <id>http://www.zotero.org/styles/chicago-fullnote-bibliography</id>
6
- <link href="http://www.zotero.org/styles/chicago-fullnote-bibliography" rel="self"/>
7
- <link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
8
- <author>
9
- <name>Julian Onions</name>
10
- <email>julian.onions@gmail.com</email>
11
- </author>
12
- <contributor>
13
- <name>Simon Kornblith</name>
14
- <email>simon@simonster.com</email>
15
- </contributor>
16
- <contributor>
17
- <name>Elena Razlogova</name>
18
- <email>elena.razlogova@gmail.com</email>
19
- </contributor>
20
- <contributor>
21
- <name>Sebastian Karcher</name>
22
- </contributor>
23
- <summary>Chicago format with full notes and bibliography</summary>
24
- <category field="generic-base"/>
25
- <category citation-format="note"/>
26
- <updated>2011-08-26T18:38:41+00:00</updated>
27
- <rights>This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/</rights>
28
- </info>
29
- <locale xml:lang="en">
30
- <terms>
31
- <term name="editortranslator" form="verb-short">
32
- <single>trans. and ed.</single>
33
- <multiple>trans. and ed.</multiple>
34
- </term>
35
- <term name="editortranslator" form="verb">
36
- <single> Translated and edited by</single>
37
- <multiple> Translated and edited by</multiple>
38
- </term>
39
- </terms>
40
- </locale>
41
- <macro name="editor-translator">
42
- <group delimiter=", ">
43
- <choose>
44
- <if variable="author">
45
- <choose>
46
- <if variable="container-author">
47
- <group>
48
- <names variable="container-author">
49
- <label form="verb-short" prefix=" " text-case="lowercase" suffix=" "/>
50
- <name and="text" delimiter=", "/>
51
- </names>
52
- </group>
53
- </if>
54
- </choose>
55
- <names variable="editor translator" delimiter=", ">
56
- <label form="verb-short" text-case="lowercase" suffix=" "/>
57
- <name and="text" delimiter=", "/>
58
- </names>
59
- </if>
60
- </choose>
61
- </group>
62
- </macro>
63
- <macro name="secondary-contributors-note">
64
- <choose>
65
- <if type="chapter paper-conference" match="none">
66
- <text macro="editor-translator"/>
67
- </if>
68
- </choose>
69
- </macro>
70
- <macro name="container-contributors-note">
71
- <choose>
72
- <if type="chapter paper-conference" match="any">
73
- <text macro="editor-translator"/>
74
- </if>
75
- </choose>
76
- </macro>
77
- <macro name="secondary-contributors">
78
- <choose>
79
- <if type="chapter paper-conference" match="none">
80
- <group delimiter=". ">
81
- <choose>
82
- <if variable="author">
83
- <names variable="editor translator" delimiter=". ">
84
- <label form="verb" text-case="capitalize-first" suffix=" "/>
85
- <name and="text" delimiter=", "/>
86
- </names>
87
- </if>
88
- </choose>
89
- </group>
90
- </if>
91
- </choose>
92
- </macro>
93
- <macro name="container-contributors">
94
- <choose>
95
- <if type="chapter paper-conference" match="any">
96
- <group delimiter=", ">
97
- <choose>
98
- <if variable="author">
99
- <choose>
100
- <if variable="container-author">
101
- <group>
102
- <names variable="container-author">
103
- <label form="verb-short" prefix=" " text-case="lowercase" suffix=" "/>
104
- <name and="text" delimiter=", "/>
105
- </names>
106
- </group>
107
- </if>
108
- </choose>
109
- <!--This includes page numers after the container author, e.g. for Introductions -->
110
- <choose>
111
- <if variable="container-author author" match="all">
112
- <group delimiter=". ">
113
- <text variable="page"/>
114
- <names variable="editor translator" delimiter=", ">
115
- <label form="verb" suffix=" "/>
116
- <name and="text" delimiter=", "/>
117
- </names>
118
- </group>
119
- </if>
120
- <else>
121
- <names variable="editor translator" delimiter=", ">
122
- <label form="verb" text-case="lowercase" suffix=" "/>
123
- <name and="text" delimiter=", "/>
124
- </names>
125
- </else>
126
- </choose>
127
- </if>
128
- </choose>
129
- </group>
130
- </if>
131
- </choose>
132
- </macro>
133
- <macro name="recipient-note">
134
- <names variable="recipient" delimiter=", ">
135
- <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
136
- <name and="text" delimiter=", "/>
137
- </names>
138
- </macro>
139
- <macro name="contributors-note">
140
- <names variable="author">
141
- <name and="text" sort-separator=", " delimiter=", "/>
142
- <label form="short" prefix=", "/>
143
- <substitute>
144
- <names variable="editor"/>
145
- <names variable="translator"/>
146
- </substitute>
147
- </names>
148
- <text macro="recipient-note"/>
149
- </macro>
150
- <macro name="editor">
151
- <names variable="editor">
152
- <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
153
- <label form="short" prefix=", "/>
154
- </names>
155
- </macro>
156
- <macro name="translator">
157
- <names variable="translator">
158
- <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
159
- <label form="verb-short" prefix=", "/>
160
- </names>
161
- </macro>
162
- <macro name="recipient">
163
- <choose>
164
- <if type="personal_communication">
165
- <choose>
166
- <if variable="genre">
167
- <text variable="genre" text-case="capitalize-first"/>
168
- </if>
169
- <else>
170
- <text term="letter" text-case="capitalize-first"/>
171
- </else>
172
- </choose>
173
- </if>
174
- </choose>
175
- <text macro="recipient-note" prefix=" "/>
176
- </macro>
177
- <macro name="contributors">
178
- <names variable="author">
179
- <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
180
- <substitute>
181
- <text macro="editor"/>
182
- <text macro="translator"/>
183
- </substitute>
184
- </names>
185
- <text macro="recipient" prefix=". "/>
186
- </macro>
187
- <macro name="recipient-short">
188
- <names variable="recipient">
189
- <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
190
- <name form="short" and="text" delimiter=", "/>
191
- </names>
192
- </macro>
193
- <macro name="contributors-short">
194
- <names variable="author">
195
- <name form="short" and="text" delimiter=", "/>
196
- <substitute>
197
- <names variable="editor"/>
198
- <names variable="translator"/>
199
- </substitute>
200
- </names>
201
- <text macro="recipient-short"/>
202
- </macro>
203
- <macro name="contributors-sort">
204
- <names variable="author">
205
- <name name-as-sort-order="all" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
206
- <label form="verb-short" prefix=", "/>
207
- <substitute>
208
- <names variable="editor"/>
209
- <names variable="translator"/>
210
- </substitute>
211
- </names>
212
- </macro>
213
- <macro name="interviewer-note">
214
- <names variable="interviewer" delimiter=", ">
215
- <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
216
- <name and="text" delimiter=", "/>
217
- </names>
218
- </macro>
219
- <macro name="interviewer">
220
- <names variable="interviewer" delimiter=", ">
221
- <label form="verb" prefix=" " text-case="capitalize-first" suffix=" "/>
222
- <name and="text" delimiter=", "/>
223
- </names>
224
- </macro>
225
- <macro name="title-note">
226
- <choose>
227
- <if variable="title" match="none">
228
- <text variable="genre"/>
229
- </if>
230
- <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
231
- <text variable="title" text-case="title" font-style="italic"/>
232
- </else-if>
233
- <else>
234
- <text variable="title" text-case="title" quotes="true"/>
235
- </else>
236
- </choose>
237
- </macro>
238
- <macro name="title">
239
- <choose>
240
- <if variable="title" match="none">
241
- <choose>
242
- <if type="personal_communication" match="none">
243
- <text variable="genre" text-case="capitalize-first"/>
244
- </if>
245
- </choose>
246
- </if>
247
- <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
248
- <text variable="title" text-case="title" font-style="italic"/>
249
- </else-if>
250
- <else>
251
- <text variable="title" text-case="title" quotes="true"/>
252
- </else>
253
- </choose>
254
- </macro>
255
- <macro name="title-short">
256
- <choose>
257
- <if variable="title" match="none">
258
- <choose>
259
- <if type="interview">
260
- <text term="interview" text-case="lowercase"/>
261
- </if>
262
- <else-if type="manuscript speech" match="any">
263
- <text variable="genre" form="short"/>
264
- </else-if>
265
- <else-if type="personal_communication">
266
- <text macro="issued"/>
267
- </else-if>
268
- </choose>
269
- </if>
270
- <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
271
- <text variable="title" text-case="title" form="short" font-style="italic"/>
272
- </else-if>
273
- <else>
274
- <text variable="title" text-case="title" form="short" quotes="true"/>
275
- </else>
276
- </choose>
277
- </macro>
278
- <macro name="description-note">
279
- <group delimiter=", ">
280
- <text macro="interviewer-note"/>
281
- <text variable="medium"/>
282
- <choose>
283
- <if variable="title" match="none"/>
284
- <else-if type="thesis speech" match="any"/>
285
- <else>
286
- <text variable="genre"/>
287
- </else>
288
- </choose>
289
- </group>
290
- </macro>
291
- <macro name="description">
292
- <group delimiter=", ">
293
- <group delimiter=". ">
294
- <text macro="interviewer"/>
295
- <text variable="medium" text-case="capitalize-first"/>
296
- </group>
297
- <choose>
298
- <if variable="title" match="none"/>
299
- <else-if type="thesis speech" match="any"/>
300
- <else>
301
- <text variable="genre" text-case="capitalize-first"/>
302
- </else>
303
- </choose>
304
- </group>
305
- </macro>
306
- <macro name="container-title-note">
307
- <choose>
308
- <if type="chapter paper-conference" match="any">
309
- <text term="in" text-case="lowercase" suffix=" "/>
310
- </if>
311
- </choose>
312
- <choose>
313
- <if type="legal_case" match="none">
314
- <text variable="container-title" text-case="title" font-style="italic"/>
315
- </if>
316
- </choose>
317
- </macro>
318
- <macro name="container-title">
319
- <choose>
320
- <if type="chapter paper-conference" match="any">
321
- <text term="in" text-case="capitalize-first" suffix=" "/>
322
- </if>
323
- </choose>
324
- <choose>
325
- <if type="legal_case" match="none">
326
- <text variable="container-title" text-case="title" font-style="italic"/>
327
- </if>
328
- </choose>
329
- </macro>
330
- <macro name="collection-title">
331
- <text variable="collection-title" text-case="title"/>
332
- <text variable="collection-number" prefix=" "/>
333
- </macro>
334
- <macro name="edition-note">
335
- <choose>
336
- <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
337
- <choose>
338
- <if is-numeric="edition">
339
- <group delimiter=" ">
340
- <number variable="edition" form="ordinal"/>
341
- <text term="edition" form="short"/>
342
- </group>
343
- </if>
344
- <else>
345
- <text variable="edition" suffix="."/>
346
- </else>
347
- </choose>
348
- </if>
349
- </choose>
350
- </macro>
351
- <macro name="edition">
352
- <choose>
353
- <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
354
- <choose>
355
- <if is-numeric="edition">
356
- <group delimiter=" ">
357
- <number variable="edition" form="ordinal"/>
358
- <text term="edition" form="short"/>
359
- </group>
360
- </if>
361
- <else>
362
- <text variable="edition" text-case="capitalize-first" suffix="."/>
363
- </else>
364
- </choose>
365
- </if>
366
- </choose>
367
- </macro>
368
- <macro name="locators-note">
369
- <choose>
370
- <if type="article-journal">
371
- <text variable="volume" prefix=" "/>
372
- <group prefix=", ">
373
- <text term="issue" form="short" suffix=" "/>
374
- <number variable="issue"/>
375
- </group>
376
- </if>
377
- <else-if type="legal_case">
378
- <text variable="volume" prefix=", "/>
379
- <text variable="container-title" prefix=" "/>
380
- <text variable="page" prefix=" "/>
381
- <text variable="locator" prefix=", "/>
382
- </else-if>
383
- <else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
384
- <group prefix=", " delimiter=", ">
385
- <group>
386
- <text term="volume" form="short" suffix=" "/>
387
- <number variable="volume" form="numeric"/>
388
- </group>
389
- <choose>
390
- <if variable="locator" match="none">
391
- <group>
392
- <number variable="number-of-volumes" form="numeric"/>
393
- <text term="volume" form="short" prefix=" " plural="true"/>
394
- </group>
395
- </if>
396
- </choose>
397
- <text macro="edition-note"/>
398
- </group>
399
- </else-if>
400
- </choose>
401
- </macro>
402
- <macro name="locators">
403
- <choose>
404
- <if type="article-journal">
405
- <text variable="volume" prefix=" "/>
406
- <group prefix=", ">
407
- <text term="issue" form="short" suffix=" "/>
408
- <number variable="issue"/>
409
- </group>
410
- </if>
411
- <else-if type="legal_case">
412
- <text variable="volume" prefix=", "/>
413
- <text variable="container-title" prefix=" "/>
414
- <text variable="page" prefix=" "/>
415
- </else-if>
416
- <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
417
- <group prefix=". " delimiter=". ">
418
- <group>
419
- <text term="volume" form="short" text-case="capitalize-first" suffix=" "/>
420
- <number variable="volume" form="numeric"/>
421
- </group>
422
- <group>
423
- <number variable="number-of-volumes" form="numeric"/>
424
- <text term="volume" form="short" prefix=" " plural="true"/>
425
- </group>
426
- <text macro="edition"/>
427
- </group>
428
- </else-if>
429
- <else-if type="chapter paper-conference" match="any">
430
- <group prefix=". " delimiter=". ">
431
- <choose>
432
- <if variable="page" match="none">
433
- <group>
434
- <text term="volume" form="short" text-case="capitalize-first" suffix=" "/>
435
- <number variable="volume" form="numeric"/>
436
- </group>
437
- </if>
438
- </choose>
439
- <text macro="edition"/>
440
- </group>
441
- </else-if>
442
- </choose>
443
- </macro>
444
- <macro name="locators-newspaper">
445
- <choose>
446
- <if type="article-newspaper">
447
- <group delimiter=", ">
448
- <group>
449
- <text variable="edition" suffix=" "/>
450
- <text term="edition" prefix=" "/>
451
- </group>
452
- <group>
453
- <text term="section" form="short" suffix=" "/>
454
- <text variable="section"/>
455
- </group>
456
- </group>
457
- </if>
458
- </choose>
459
- </macro>
460
- <macro name="event">
461
- <group>
462
- <text term="presented at" suffix=" "/>
463
- <text variable="event"/>
464
- </group>
465
- </macro>
466
- <macro name="publisher">
467
- <choose>
468
- <if type="thesis">
469
- <text variable="publisher"/>
470
- </if>
471
- <else>
472
- <group delimiter=": ">
473
- <text variable="publisher-place"/>
474
- <text variable="publisher"/>
475
- </group>
476
- </else>
477
- </choose>
478
- </macro>
479
- <macro name="issued">
480
- <choose>
481
- <if variable="issued">
482
- <choose>
483
- <if type="graphic report" match="any">
484
- <date variable="issued">
485
- <date-part name="month" suffix=" "/>
486
- <date-part name="day" suffix=", "/>
487
- <date-part name="year"/>
488
- </date>
489
- </if>
490
- <else-if type="legal_case">
491
- <text variable="authority" suffix=" "/>
492
- <date variable="issued">
493
- <date-part name="year"/>
494
- </date>
495
- </else-if>
496
- <else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song thesis" match="any">
497
- <date variable="issued">
498
- <date-part name="year"/>
499
- </date>
500
- </else-if>
501
- <else>
502
- <date variable="issued">
503
- <date-part name="month" suffix=" "/>
504
- <date-part name="day" suffix=", "/>
505
- <date-part name="year"/>
506
- </date>
507
- </else>
508
- </choose>
509
- </if>
510
- <else>
511
- <text term="no date" form="short"/>
512
- </else>
513
- </choose>
514
- </macro>
515
- <macro name="point-locators-subsequent">
516
- <group>
517
- <choose>
518
- <if locator="page" match="none">
519
- <choose>
520
- <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
521
- <choose>
522
- <if variable="volume">
523
- <group>
524
- <text term="volume" form="short" text-case="lowercase" suffix=" "/>
525
- <number variable="volume" form="numeric"/>
526
- <label variable="locator" form="short" prefix=", " suffix=" "/>
527
- </group>
528
- </if>
529
- <else>
530
- <label variable="locator" form="short" suffix=" "/>
531
- </else>
532
- </choose>
533
- </if>
534
- <else>
535
- <label variable="locator" form="short" suffix=" "/>
536
- </else>
537
- </choose>
538
- </if>
539
- <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
540
- <number variable="volume" form="numeric" suffix=":"/>
541
- </else-if>
542
- </choose>
543
- <text variable="locator"/>
544
- </group>
545
- </macro>
546
- <macro name="point-locators">
547
- <choose>
548
- <if variable="locator" match="none">
549
- <text macro="pages"/>
550
- </if>
551
- <else-if type="article-journal">
552
- <group delimiter=" " prefix=": ">
553
- <choose>
554
- <if locator="page" match="none">
555
- <label variable="locator" form="short" suffix=" "/>
556
- </if>
557
- </choose>
558
- <text variable="locator"/>
559
- </group>
560
- </else-if>
561
- <else-if type="legal_case"/>
562
- <else>
563
- <group prefix=", ">
564
- <choose>
565
- <if locator="page" match="none">
566
- <label variable="locator" form="short" suffix=" "/>
567
- </if>
568
- </choose>
569
- <text variable="locator"/>
570
- </group>
571
- </else>
572
- </choose>
573
- </macro>
574
- <macro name="pages">
575
- <choose>
576
- <if type="article-journal">
577
- <text variable="page" prefix=": "/>
578
- </if>
579
- <else-if type="chapter paper-conference" match="any">
580
- <text variable="page" prefix=", "/>
581
- </else-if>
582
- </choose>
583
- </macro>
584
- <macro name="locators-chapter">
585
- <choose>
586
- <if type="chapter paper-conference" match="any">
587
- <choose>
588
- <!--If author and container-author are present, page numbers are in macro container-contributor. Leave them out here-->
589
- <if variable="author container-author" match="all">
590
- </if>
591
- <else>
592
- <choose>
593
- <if variable="page">
594
- <text variable="volume" suffix=":"/>
595
- <text variable="page"/>
596
- </if>
597
- </choose>
598
- </else>
599
- </choose>
600
- </if>
601
- </choose>
602
- </macro>
603
- <macro name="locators-journal">
604
- <choose>
605
- <if type="article-journal">
606
- <text variable="page" prefix=": "/>
607
- </if>
608
- </choose>
609
- </macro>
610
- <macro name="archive-note">
611
- <choose>
612
- <if type="thesis">
613
- <group delimiter=" ">
614
- <text variable="archive"/>
615
- <text variable="archive_location" prefix="(" suffix=")"/>
616
- </group>
617
- </if>
618
- <else>
619
- <group delimiter=", ">
620
- <text variable="archive_location"/>
621
- <text variable="archive"/>
622
- <text variable="archive-place"/>
623
- </group>
624
- </else>
625
- </choose>
626
- </macro>
627
- <macro name="archive">
628
- <choose>
629
- <if type="thesis">
630
- <group delimiter=" ">
631
- <text variable="archive"/>
632
- <text variable="archive_location" prefix="(" suffix=")"/>
633
- </group>
634
- </if>
635
- <else>
636
- <group delimiter=". ">
637
- <text variable="archive_location" text-case="capitalize-first"/>
638
- <text variable="archive"/>
639
- <text variable="archive-place"/>
640
- </group>
641
- </else>
642
- </choose>
643
- </macro>
644
- <macro name="issue-note">
645
- <choose>
646
- <if type="article-journal legal_case" match="any">
647
- <text macro="issued" prefix=" (" suffix=")"/>
648
- </if>
649
- <else-if variable="publisher-place publisher" match="any">
650
- <group prefix=" (" suffix=")" delimiter=", ">
651
- <group delimiter=" ">
652
- <choose>
653
- <if variable="title" match="none"/>
654
- <else-if type="thesis speech" match="any">
655
- <text variable="genre"/>
656
- </else-if>
657
- </choose>
658
- <text macro="event"/>
659
- </group>
660
- <text macro="publisher"/>
661
- <text macro="issued"/>
662
- </group>
663
- </else-if>
664
- <else>
665
- <text macro="issued" prefix=", "/>
666
- </else>
667
- </choose>
668
- </macro>
669
- <macro name="issue">
670
- <choose>
671
- <if type="article-journal legal_case" match="any">
672
- <text macro="issued" prefix=" (" suffix=")"/>
673
- </if>
674
- <else-if type="speech">
675
- <choose>
676
- <if variable="title" match="none"/>
677
- <else>
678
- <text variable="genre" text-case="capitalize-first" prefix=". "/>
679
- </else>
680
- </choose>
681
- <text macro="event" prefix=" "/>
682
- <text variable="event-place" prefix=", "/>
683
- <text macro="issued" prefix=", "/>
684
- </else-if>
685
- <else-if variable="publisher-place publisher" match="any">
686
- <group prefix=". " delimiter=", ">
687
- <choose>
688
- <if type="thesis">
689
- <text variable="genre" text-case="capitalize-first"/>
690
- </if>
691
- </choose>
692
- <text macro="publisher"/>
693
- <text macro="issued"/>
694
- </group>
695
- </else-if>
696
- <else>
697
- <text macro="issued" prefix=", "/>
698
- </else>
699
- </choose>
700
- </macro>
701
- <macro name="access-note">
702
- <group delimiter=", ">
703
- <choose>
704
- <if type="graphic report" match="any">
705
- <text macro="archive-note"/>
706
- </if>
707
- <else-if type="article-journal article-magazine article-newspaper bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="none">
708
- <text macro="archive-note"/>
709
- </else-if>
710
- </choose>
711
- <choose>
712
- <if type="legal_case" match="none">
713
- <text variable="URL"/>
714
- </if>
715
- </choose>
716
- </group>
717
- </macro>
718
- <macro name="access">
719
- <group delimiter=". ">
720
- <choose>
721
- <if type="graphic report" match="any">
722
- <text macro="archive"/>
723
- </if>
724
- <else-if type=" article-journal article-magazine article-newspaper bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="none">
725
- <text macro="archive"/>
726
- </else-if>
727
- </choose>
728
- <choose>
729
- <if type="legal_case" match="none">
730
- <text variable="URL"/>
731
- </if>
732
- </choose>
733
- </group>
734
- </macro>
735
- <macro name="sort-key">
736
- <text macro="contributors-sort" suffix=" "/>
737
- <text variable="title" suffix=" "/>
738
- <text variable="genre"/>
739
- </macro>
740
- <citation et-al-min="4" et-al-use-first="1" disambiguate-add-names="true">
741
- <layout prefix="" suffix="." delimiter="; ">
742
- <choose>
743
- <if position="ibid-with-locator">
744
- <group delimiter=", ">
745
- <text term="ibid"/>
746
- <text macro="point-locators-subsequent"/>
747
- </group>
748
- </if>
749
- <else-if position="ibid">
750
- <text term="ibid"/>
751
- </else-if>
752
- <else-if position="subsequent">
753
- <group delimiter=", ">
754
- <text macro="contributors-short"/>
755
- <text macro="title-short"/>
756
- <text macro="point-locators-subsequent"/>
757
- </group>
758
- </else-if>
759
- <else>
760
- <group delimiter=", ">
761
- <text macro="contributors-note"/>
762
- <text macro="title-note"/>
763
- <text macro="description-note"/>
764
- <text macro="secondary-contributors-note"/>
765
- <text macro="container-title-note"/>
766
- <text macro="container-contributors-note"/>
767
- </group>
768
- <text macro="locators-note"/>
769
- <text macro="collection-title" prefix=", "/>
770
- <text macro="issue-note"/>
771
- <text macro="locators-newspaper" prefix=", "/>
772
- <text macro="point-locators"/>
773
- <text macro="access-note" prefix=", "/>
774
- </else>
775
- </choose>
776
- </layout>
777
- </citation>
778
- <bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" subsequent-author-substitute="———" entry-spacing="0">
779
- <sort>
780
- <key macro="sort-key"/>
781
- <key variable="issued"/>
782
- </sort>
783
- <layout suffix=".">
784
- <group delimiter=". ">
785
- <text macro="contributors"/>
786
- <text macro="title"/>
787
- <text macro="description"/>
788
- <text macro="secondary-contributors"/>
789
- <group delimiter=", ">
790
- <text macro="container-title"/>
791
- <text macro="container-contributors"/>
792
- <text macro="locators-chapter"/>
793
- </group>
794
- </group>
795
- <text macro="locators"/>
796
- <text macro="collection-title" prefix=". "/>
797
- <text macro="issue"/>
798
- <text macro="locators-newspaper" prefix=", "/>
799
- <text macro="locators-journal"/>
800
- <text macro="access" prefix=". "/>
801
- </layout>
802
- </bibliography>
803
- </style>