citeproc-rb 0.0.1

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 (52) hide show
  1. data/README +93 -0
  2. data/Rakefile +73 -0
  3. data/TODO +25 -0
  4. data/VERSION +1 -0
  5. data/data/locales/locales_en.xml +89 -0
  6. data/data/locales/locales_nl.xml +96 -0
  7. data/data/styles/ama.csl +184 -0
  8. data/data/styles/apa.csl +230 -0
  9. data/data/styles/apsa.csl +175 -0
  10. data/data/styles/asa.csl +215 -0
  11. data/data/styles/chicago-author-date.csl +361 -0
  12. data/data/styles/chicago-fullnote-bibliography.csl +665 -0
  13. data/data/styles/chicago-note-bibliography.csl +437 -0
  14. data/data/styles/chicago-note.csl +383 -0
  15. data/data/styles/harvard.csl +185 -0
  16. data/data/styles/ieee.csl +111 -0
  17. data/data/styles/mhra.csl +317 -0
  18. data/data/styles/mla.csl +173 -0
  19. data/data/styles/nature.csl +87 -0
  20. data/data/styles/nlm.csl +118 -0
  21. data/examples/citeproc_driver.rb +174 -0
  22. data/lib/citeproc.rb +28 -0
  23. data/lib/citeproc/csl.rb +647 -0
  24. data/lib/citeproc/csl_parser.rb +479 -0
  25. data/lib/citeproc/csl_processor.rb +485 -0
  26. data/lib/citeproc/csl_reference.rb +228 -0
  27. data/lib/citeproc/filters/bibo/bibo.rb +635 -0
  28. data/lib/citeproc/filters/bibo/bibo_input_filter.rb +242 -0
  29. data/lib/citeproc/filters/bibo/bibo_utils.rb +75 -0
  30. data/lib/citeproc/filters/csl_citation/csl_citation.rb +137 -0
  31. data/lib/citeproc/filters/csl_citation/csl_citation_input_filter.rb +274 -0
  32. data/lib/citeproc/formatters/base_formatter.rb +115 -0
  33. data/lib/citeproc/formatters/xhtml_formatter.rb +144 -0
  34. data/lib/citeproc/input_filter.rb +97 -0
  35. data/test/fixtures/bibo_test_data.n3 +191 -0
  36. data/test/fixtures/bibo_test_data.yaml +96 -0
  37. data/test/fixtures/bibo_test_how_to_cook.n3 +63 -0
  38. data/test/fixtures/bibo_test_zotero.rdf +129 -0
  39. data/test/fixtures/csl_test_data.json +62 -0
  40. data/test/fixtures/csl_test_data.yaml +8 -0
  41. data/test/fixtures/locales/test_locale_en.xml +89 -0
  42. data/test/fixtures/styles/test_csl_parse.csl +230 -0
  43. data/test/fixtures/styles/test_groups.csl +32 -0
  44. data/test/fixtures/styles/test_names.csl +46 -0
  45. data/test/fixtures/styles/test_sort.csl +125 -0
  46. data/test/fixtures/styles/test_text_terms.csl +40 -0
  47. data/test/test_all.rb +14 -0
  48. data/test/test_bibo.rb +20 -0
  49. data/test/test_csl.rb +136 -0
  50. data/test/test_csl_parser.rb +222 -0
  51. data/test/test_sample_bibo.rb +82 -0
  52. metadata +101 -0
@@ -0,0 +1,230 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <?oxygen RNGSchema="http://xbiblio.svn.sourceforge.net/viewvc/*checkout*/xbiblio/csl/schema/trunk/csl.rnc" type="compact"?>
3
+ <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" xml:lang="en">
4
+ <info>
5
+ <title>American Psychological Association</title>
6
+ <id>http://www.zotero.org/styles/apa</id>
7
+ <link href="http://www.zotero.org/styles/apa"/>
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
+ <category term="psychology"/>
16
+ <category term="generic-base"/>
17
+ <category term="author-date"/>
18
+ <updated>2008-05-07T12:08:52+00:00</updated>
19
+ </info>
20
+ <macro name="container-contributors">
21
+ <choose>
22
+ <if type="chapter">
23
+ <text term="in" text-case="capitalize-first" suffix=" "/>
24
+ <names variable="editor translator" delimiter=", " suffix=", ">
25
+ <name and="symbol" initialize-with=". " delimiter=", "/>
26
+ <label form="short" prefix=" (" text-case="capitalize-first" suffix=".)"/>
27
+ </names>
28
+ </if>
29
+ </choose>
30
+ </macro>
31
+ <macro name="secondary-contributors">
32
+ <choose>
33
+ <if type="chapter" match="none">
34
+ <names variable="editor translator" delimiter=", " prefix=" (" suffix=")">
35
+ <name and="symbol" initialize-with=". " delimiter=", "/>
36
+ <label form="short" prefix=", " text-case="capitalize-first" suffix="."/>
37
+ </names>
38
+ </if>
39
+ </choose>
40
+ </macro>
41
+ <macro name="author">
42
+ <names variable="author">
43
+ <name name-as-sort-order="all" and="symbol" sort-separator=", "
44
+ initialize-with=". " delimiter=", " delimiter-precedes-last="always"/>
45
+ <label form="short" prefix=" (" suffix=".)" text-case="capitalize-first"/>
46
+ <substitute>
47
+ <names variable="editor"/>
48
+ <names variable="translator"/>
49
+ <text macro="title"/>
50
+ </substitute>
51
+ </names>
52
+ </macro>
53
+ <macro name="author-short">
54
+ <names variable="author">
55
+ <name form="short" and="symbol" delimiter=", " initialize-with=". "/>
56
+ <substitute>
57
+ <names variable="editor"/>
58
+ <names variable="translator"/>
59
+ <choose>
60
+ <if type="book">
61
+ <text variable="title" form="short" font-style="italic"/>
62
+ </if>
63
+ <else>
64
+ <text variable="title" form="short" quotes="true"/>
65
+ </else>
66
+ </choose>
67
+ </substitute>
68
+ </names>
69
+ </macro>
70
+ <macro name="access">
71
+ <choose>
72
+ <if variable="DOI">
73
+ <text variable="DOI" prefix="doi: "/>
74
+ </if>
75
+ <else>
76
+ <group>
77
+ <text term="retrieved" text-case="capitalize-first" suffix=" "/>
78
+ <date variable="accessed" suffix=", ">
79
+ <date-part name="month" suffix=" "/>
80
+ <date-part name="day" suffix=", "/>
81
+ <date-part name="year"/>
82
+ </date>
83
+ <group>
84
+ <text term="from" suffix=" "/>
85
+ <text variable="URL"/>
86
+ </group>
87
+ </group>
88
+ </else>
89
+ </choose>
90
+ </macro>
91
+ <macro name="title">
92
+ <choose>
93
+ <if type="book thesis" match="any">
94
+ <text variable="title" font-style="italic"/>
95
+ </if>
96
+ <else>
97
+ <text variable="title" suffix=". "/>
98
+ </else>
99
+ </choose>
100
+ </macro>
101
+ <macro name="publisher">
102
+ <text variable="genre" suffix=", "/>
103
+ <group delimiter=": ">
104
+ <text variable="publisher-place"/>
105
+ <text variable="publisher"/>
106
+ </group>
107
+ </macro>
108
+ <macro name="event">
109
+ <text variable="event"/>
110
+ <text variable="event-place" prefix=", "/>
111
+ </macro>
112
+ <macro name="issued">
113
+ <group prefix=" (" suffix=").">
114
+ <date variable="issued">
115
+ <date-part name="year"/>
116
+ </date>
117
+ <choose>
118
+ <if type="book chapter article-journal" match="none">
119
+ <date variable="issued">
120
+ <date-part prefix=", " name="month"/>
121
+ <date-part prefix=" " name="day"/>
122
+ </date>
123
+ </if>
124
+ </choose>
125
+ </group>
126
+ </macro>
127
+ <macro name="issued-year">
128
+ <date variable="issued">
129
+ <date-part name="year"/>
130
+ </date>
131
+ </macro>
132
+ <macro name="edition">
133
+ <choose>
134
+ <if type="book chapter" match="any">
135
+ <choose>
136
+ <if is-numeric="edition">
137
+ <group delimiter=" ">
138
+ <number variable="edition" form="ordinal"/>
139
+ <text term="edition" form="short" suffix="."/>
140
+ </group>
141
+ </if>
142
+ <else>
143
+ <text variable="edition" suffix="."/>
144
+ </else>
145
+ </choose>
146
+ </if>
147
+ </choose>
148
+ </macro>
149
+ <macro name="locators">
150
+ <choose>
151
+ <if type="article-journal article-magazine article-newspaper" match="any">
152
+ <group prefix=", " delimiter=", ">
153
+ <group>
154
+ <text variable="volume" font-style="italic"/>
155
+ <text variable="issue" prefix="(" suffix=")"/>
156
+ </group>
157
+ <text variable="page"/>
158
+ </group>
159
+ </if>
160
+ <else-if type="book chapter" match="any">
161
+ <group prefix=" (" suffix=")" delimiter=", ">
162
+ <text macro="edition"/>
163
+ <group>
164
+ <text term="volume" form="short" plural="true" text-case="capitalize-first" suffix=". "/>
165
+ <number variable="number-of-volumes" form="numeric" prefix="1-"/>
166
+ </group>
167
+ <group>
168
+ <text term="volume" form="short" text-case="capitalize-first" suffix=". "/>
169
+ <number variable="volume" form="numeric"/>
170
+ </group>
171
+ <group>
172
+ <label variable="page" form="short" include-period="true" suffix=" "/>
173
+ <text variable="page"/>
174
+ </group>
175
+ </group>
176
+ </else-if>
177
+ </choose>
178
+ </macro>
179
+ <macro name="citation-locator">
180
+ <group>
181
+ <label variable="locator" include-period="true" form="short"/>
182
+ <text variable="locator" prefix=" "/>
183
+ </group>
184
+ </macro>
185
+ <citation>
186
+ <option name="et-al-min" value="6"/>
187
+ <option name="et-al-use-first" value="1"/>
188
+ <option name="et-al-subsequent-min" value="3"/>
189
+ <option name="et-al-subsequent-use-first" value="1"/>
190
+ <option name="disambiguate-add-year-suffix" value="true"/>
191
+ <option name="disambiguate-add-names" value="true"/>
192
+ <option name="disambiguate-add-givenname" value="true"/>
193
+ <option name="collapse" value="year"/>
194
+ <sort>
195
+ <key macro="author"/>
196
+ <key variable="issued"/>
197
+ </sort>
198
+ <layout prefix="(" suffix=")" delimiter="; ">
199
+ <group delimiter=", ">
200
+ <text macro="author-short"/>
201
+ <text macro="issued-year"/>
202
+ <text macro="citation-locator"/>
203
+ </group>
204
+ </layout>
205
+ </citation>
206
+ <bibliography>
207
+ <option name="hanging-indent" value="true"/>
208
+ <option name="et-al-min" value="6"/>
209
+ <option name="et-al-use-first" value="6"/>
210
+ <option name="entry-spacing" value="0"/>
211
+ <sort>
212
+ <key macro="author"/>
213
+ <key variable="issued"/>
214
+ </sort>
215
+ <layout suffix=".">
216
+ <text macro="author" suffix="."/>
217
+ <text macro="issued"/>
218
+ <text macro="title" prefix=" "/>
219
+ <text macro="container-contributors"/>
220
+ <text macro="secondary-contributors"/>
221
+ <text variable="container-title" font-style="italic"/>
222
+ <text variable="collection-title" prefix=", " suffix="."/>
223
+ <text macro="locators"/>
224
+ <group delimiter=". " prefix=". ">
225
+ <text macro="publisher"/>
226
+ <text macro="access"/>
227
+ </group>
228
+ </layout>
229
+ </bibliography>
230
+ </style>
@@ -0,0 +1,175 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <style xmlns="http://purl.org/net/xbiblio/csl" xml:lang="en" class="in-text" >
3
+ <info>
4
+ <title>American Political Science Association</title>
5
+ <id>http://www.zotero.org/styles/apsa</id>
6
+ <link href="http://www.zotero.org/styles/apsa"/>
7
+ <author>
8
+ <name>Julian Onions</name>
9
+ <email>julian.onions@gmail.com</email>
10
+ </author>
11
+ <category term="author-date"/>
12
+ <category term="political_science"/>
13
+ <updated>2008-02-02T00:00:00+00:00</updated>
14
+ <summary>The American Political Science Association style.</summary>
15
+ <link href="http://www.wisc.edu/writing/Handbook/DocAPSA.html" rel="documentation"/>
16
+ </info>
17
+ <macro name="editor">
18
+ <names variable="editor" delimiter=", ">
19
+ <label form="short" text-case="lowercase" suffix=". "/>
20
+ <name and="text" delimiter=", "/>
21
+ </names>
22
+ </macro>
23
+ <macro name="author">
24
+ <names variable="author">
25
+ <name name-as-sort-order="first" and="text" sort-separator=", "
26
+ delimiter=", " delimiter-precedes-last="always"/>
27
+ <label form="short" prefix=", " suffix="." text-case="lowercase"/>
28
+ <substitute>
29
+ <names variable="editor"/>
30
+ <text variable="title"/>
31
+ </substitute>
32
+ </names>
33
+ </macro>
34
+ <macro name="author-short">
35
+ <names variable="author">
36
+ <name form="short" and="text" delimiter=", " initialize-with=". "/>
37
+ <substitute>
38
+ <names variable="editor"/>
39
+ <names variable="translator"/>
40
+ <text variable="title"/>
41
+ </substitute>
42
+ </names>
43
+ </macro>
44
+ <macro name="access">
45
+ <group delimiter=" ">
46
+ <text value="Available at:"/>
47
+ <text variable="URL"/>
48
+ <group prefix="[" suffix="]">
49
+ <text term="accessed" text-case="capitalize-first" suffix=" "/>
50
+ <date variable="accessed">
51
+ <date-part name="month" suffix=" "/>
52
+ <date-part name="day" suffix=", "/>
53
+ <date-part name="year"/>
54
+ </date>
55
+ </group>
56
+ </group>
57
+ </macro>
58
+ <macro name="title">
59
+ <choose>
60
+ <if type="book">
61
+ <text variable="title" font-style="italic"/>
62
+ </if>
63
+ <else>
64
+ <text variable="title"/>
65
+ </else>
66
+ </choose>
67
+ </macro>
68
+ <macro name="publisher">
69
+ <group delimiter=": ">
70
+ <text variable="publisher-place"/>
71
+ <text variable="publisher"/>
72
+ </group>
73
+ </macro>
74
+ <macro name="year-date">
75
+ <group prefix=" ">
76
+ <choose>
77
+ <if variable="issued">
78
+ <date variable="issued">
79
+ <date-part name="year"/>
80
+ </date>
81
+ </if>
82
+ <else>
83
+ <text term="no date"/>
84
+ </else>
85
+ </choose>
86
+ </group>
87
+ </macro>
88
+ <macro name="edition">
89
+ <choose>
90
+ <if is-numeric="edition">
91
+ <group delimiter=" ">
92
+ <number variable="edition" form="ordinal"/>
93
+ <text term="edition" form="short" suffix="."/>
94
+ </group>
95
+ </if>
96
+ <else>
97
+ <text variable="edition" suffix="."/>
98
+ </else>
99
+ </choose>
100
+ </macro>
101
+ <citation>
102
+ <option name="et-al-min" value="4"/>
103
+ <option name="et-al-use-first" value="1"/>
104
+ <option name="et-al-subsequent-min" value="6"/>
105
+ <option name="et-al-subsequent-use-first" value="1"/>
106
+ <option name="disambiguate-add-year-suffix" value="true"/>
107
+ <option name="disambiguate-add-names" value="true"/>
108
+ <option name="disambiguate-add-givenname" value="true"/>
109
+ <option name="collapse" value="year"/>
110
+ <layout prefix="(" suffix=")" delimiter="; ">
111
+ <group delimiter=", ">
112
+ <group delimiter=" ">
113
+ <text macro="author-short"/>
114
+ <text macro="year-date"/>
115
+ </group>
116
+ <text variable="locator"/>
117
+ </group>
118
+ </layout>
119
+ </citation>
120
+ <bibliography>
121
+ <option name="hanging-indent" value="true"/>
122
+ <option name="et-al-min" value="4"/>
123
+ <option name="et-al-use-first" value="1"/>
124
+ <sort>
125
+ <key macro="author"/>
126
+ <key variable="title"/>
127
+ </sort>
128
+ <layout>
129
+ <text macro="author" suffix="."/>
130
+ <date variable="issued" prefix=" " suffix=".">
131
+ <date-part name="year"/>
132
+ </date>
133
+ <choose>
134
+ <if type="book">
135
+ <group prefix=" " delimiter=" ">
136
+ <text macro="title" suffix="."/>
137
+ <text macro="edition"/>
138
+ <text macro="editor" suffix="."/>
139
+ </group>
140
+ <text prefix=" " suffix="." macro="publisher"/>
141
+ </if>
142
+ <else-if type="chapter">
143
+ <text macro="title" prefix=" " suffix="." quotes="true"/>
144
+ <group class="container" prefix=" " delimiter=" ">
145
+ <text term="in" text-case="capitalize-first"/>
146
+ <text variable="container-title" font-style="italic" suffix=","/>
147
+ <text variable="collection-title" suffix=","/>
148
+ <text macro="editor" suffix="."/>
149
+ <group suffix=".">
150
+ <text macro="publisher" prefix=" "/>
151
+ <group prefix=", ">
152
+ <text variable="page" prefix="p. "/>
153
+ </group>
154
+ </group>
155
+ </group>
156
+ </else-if>
157
+ <else>
158
+ <group prefix=" " delimiter=" " suffix=".">
159
+ <text macro="title" quotes="true"/>
160
+ <text macro="editor" />
161
+ </group>
162
+ <group class="container" prefix=" " suffix=".">
163
+ <text variable="container-title" font-style="italic"/>
164
+ <group prefix=" ">
165
+ <text variable="volume" />
166
+ <text variable="issue" prefix="(" suffix=")"/>
167
+ </group>
168
+ <text variable="page" prefix=":"/>
169
+ </group>
170
+ </else>
171
+ </choose>
172
+ <text prefix=" " macro="access" suffix="."/>
173
+ </layout>
174
+ </bibliography>
175
+ </style>
@@ -0,0 +1,215 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <style xmlns="http://purl.org/net/xbiblio/csl" xml:lang="en" class="in-text" >
3
+ <info>
4
+ <title>American Sociological Association</title>
5
+ <id>http://www.zotero.org/styles/asa</id>
6
+ <link href="http://www.zotero.org/styles/asa"/>
7
+ <author>
8
+ <name>Julian Onions</name>
9
+ <email>julian.onions@gmail.com</email>
10
+ </author>
11
+ <category term="author-date"/>
12
+ <category term="sociology"/>
13
+ <updated>2008-04-30T13:29:47+00:00</updated>
14
+ <summary>The ASA style.</summary>
15
+ <link href="http://www.asanet.org/page.ww?name=Quick+Style+Guide%38section=Sociology+Depts" rel="documentation"/>
16
+ </info>
17
+ <macro name="editor">
18
+ <names variable="editor">
19
+ <label form="verb" text-case="lowercase" suffix=" "/>
20
+ <name and="text" delimiter=", "/>
21
+ </names>
22
+ </macro>
23
+ <macro name="series-editor">
24
+ <names variable="original-author">
25
+ <label form="short" text-case="capitalize-first" suffix=". "/>
26
+ <name and="text" delimiter=", "/>
27
+ </names>
28
+ </macro>
29
+ <macro name="anon">
30
+ <text term="anonymous" form="short" text-case="capitalize-first"/>
31
+ </macro>
32
+ <macro name="author">
33
+ <names variable="author">
34
+ <name and="text" name-as-sort-order="first" sort-separator=", " delimiter=", "
35
+ delimiter-precedes-last="always"/>
36
+ <label form="short" prefix=", " suffix="." text-case="lowercase"/>
37
+ <substitute>
38
+ <names variable="editor"/>
39
+ <names variable="translator"/>
40
+ <text macro="anon"/>
41
+ </substitute>
42
+ </names>
43
+ </macro>
44
+ <macro name="author-short">
45
+ <names variable="author">
46
+ <name form="short" and="text" delimiter=", "/>
47
+ <substitute>
48
+ <names variable="editor"/>
49
+ <names variable="translator"/>
50
+ <text macro="anon"/>
51
+ </substitute>
52
+ </names>
53
+ </macro>
54
+ <macro name="access">
55
+ <group>
56
+ <text variable="URL"/>
57
+ <group prefix=" (" suffix=")">
58
+ <text term="accessed" text-case="capitalize-first" suffix=" "/>
59
+ <date variable="accessed">
60
+ <date-part name="month" suffix=" "/>
61
+ <date-part name="day" suffix=", "/>
62
+ <date-part name="year"/>
63
+ </date>
64
+ </group>
65
+ </group>
66
+ </macro>
67
+ <macro name="title">
68
+ <choose>
69
+ <if type="thesis">
70
+ <text variable="title"/>
71
+ </if>
72
+ <else-if type="book">
73
+ <text variable="title" font-style="italic"/>
74
+ </else-if>
75
+ <else>
76
+ <text variable="title" quotes="true"/>
77
+ </else>
78
+ </choose>
79
+ </macro>
80
+ <macro name="publisher">
81
+ <group delimiter=": " >
82
+ <text variable="publisher-place"/>
83
+ <text variable="publisher"/>
84
+ </group>
85
+ </macro>
86
+ <macro name="year-date">
87
+ <choose>
88
+ <if variable="issued">
89
+ <date variable="issued">
90
+ <date-part name="year"/>
91
+ </date>
92
+ </if>
93
+ <else>
94
+ <text term="no date" form="short"/>
95
+ </else>
96
+ </choose>
97
+ </macro>
98
+ <macro name="day-month">
99
+ <date variable="issued">
100
+ <date-part name="month"/>
101
+ <date-part name="day" prefix=" "/>
102
+ </date>
103
+ </macro>
104
+ <macro name="pages">
105
+ <label variable="page" form="short" suffix=". " text-case="capitalize-first"/>
106
+ <text variable="page"/>
107
+ </macro>
108
+ <macro name="edition">
109
+ <choose>
110
+ <if is-numeric="edition">
111
+ <group delimiter=" ">
112
+ <number variable="edition" form="ordinal"/>
113
+ <text term="edition" form="short" suffix="."/>
114
+ </group>
115
+ </if>
116
+ <else>
117
+ <text variable="edition" suffix="."/>
118
+ </else>
119
+ </choose>
120
+ </macro>
121
+ <citation>
122
+ <option name="et-al-min" value="4"/>
123
+ <option name="et-al-use-first" value="1"/>
124
+ <option name="et-al-subsequent-min" value="3"/>
125
+ <option name="et-al-subsequent-use-first" value="1"/>
126
+ <option name="disambiguate-add-year-suffix" value="true"/>
127
+ <option name="disambiguate-add-names" value="true"/>
128
+ <option name="disambiguate-add-givenname" value="true"/>
129
+ <option name="collapse" value="year"/>
130
+ <layout prefix="(" suffix=")" delimiter="; ">
131
+ <group delimiter=":">
132
+ <group delimiter=" ">
133
+ <text macro="author-short"/>
134
+ <text macro="year-date"/>
135
+ </group>
136
+ <text variable="locator"/>
137
+ </group>
138
+ </layout>
139
+ </citation>
140
+ <bibliography>
141
+ <option name="hanging-indent" value="true"/>
142
+ <option name="et-al-min" value="6"/>
143
+ <option name="et-al-use-first" value="1"/>
144
+ <sort>
145
+ <key macro="author"/>
146
+ <key variable="title"/>
147
+ </sort>
148
+ <layout suffix=".">
149
+ <group delimiter=" ">
150
+ <text macro="author" suffix="."/>
151
+ <text macro="year-date" suffix="."/>
152
+ </group>
153
+ <choose>
154
+ <if type="article-newspaper article-magazine" match="any">
155
+ <group delimiter=" ">
156
+ <text macro="title" prefix=" " suffix="."/>
157
+ </group>
158
+ <group prefix=" " delimiter=", ">
159
+ <text variable="container-title" font-style="italic"/>
160
+ <text macro="day-month"/>
161
+ <text variable="edition"/>
162
+ <text variable="page"/>
163
+ </group>
164
+ </if>
165
+ <else-if type="thesis">
166
+ <text macro="title" prefix=" " suffix="." quotes="true"/>
167
+ <group prefix=" " delimiter=", ">
168
+ <text macro="edition" />
169
+ <text macro="editor" suffix="."/>
170
+ <text variable="genre"/>
171
+ <text macro="publisher"/>
172
+ </group>
173
+ </else-if>
174
+ <else-if type="book">
175
+ <group delimiter=" ">
176
+ <text macro="title" prefix=" " suffix="."/>
177
+ <text macro="edition" />
178
+ <text macro="editor" suffix="."/>
179
+ <text macro="publisher"/>
180
+ </group>
181
+ </else-if>
182
+ <else-if type="chapter">
183
+ <group delimiter=" ">
184
+ <text macro="title" prefix=" " suffix="."/>
185
+ <group class="container" delimiter=", " suffix=".">
186
+ <group delimiter=" ">
187
+ <text macro="pages"/>
188
+ <text term="in" text-case="lowercase"/>
189
+ <text variable="container-title" font-style="italic"/>
190
+ </group>
191
+ <text variable="volume" prefix="vol. "/>
192
+ <text variable="collection-title" font-style="italic"/>
193
+ <text macro="editor" prefix=" "/>
194
+ </group>
195
+ <text macro="publisher" prefix=" "/>
196
+ </group>
197
+ </else-if>
198
+ <else>
199
+ <group suffix="." >
200
+ <text macro="title" prefix=" " />
201
+ <text macro="editor" prefix=" "/>
202
+ </group>
203
+ <group class="container" prefix=" " suffix="." delimiter=" ">
204
+ <text variable="container-title" font-style="italic"/>
205
+ <group delimiter=":">
206
+ <text variable="volume" />
207
+ <text variable="page"/>
208
+ </group>
209
+ </group>
210
+ </else>
211
+ </choose>
212
+ <text prefix=" " macro="access" suffix="."/>
213
+ </layout>
214
+ </bibliography>
215
+ </style>