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,305 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0" xml:lang="zh-TW">
3
- <style-options punctuation-in-quote="false"/>
4
- <date form="text">
5
- <date-part name="year" suffix="年"/>
6
- <date-part name="month" form="numeric" suffix="月"/>
7
- <date-part name="day" suffix="日"/>
8
- </date>
9
- <date form="numeric">
10
- <date-part name="year"/>
11
- <date-part name="month" form="numeric-leading-zeros" prefix="/"/>
12
- <date-part name="day" form="numeric-leading-zeros" prefix="/"/>
13
- </date>
14
- <terms>
15
- <term name="accessed">被取用</term>
16
- <term name="and">及</term>
17
- <term name="and others">及其他</term>
18
- <term name="anonymous">不具名的</term>
19
- <term name="anonymous" form="short">無名</term>
20
- <term name="at">在</term>
21
- <term name="by">by</term>
22
- <term name="circa">circa</term>
23
- <term name="circa" form="short">c.</term>
24
- <term name="cited">被引用</term>
25
- <term name="edition">
26
- <single>版本</single>
27
- <multiple>版本</multiple>
28
- </term>
29
- <term name="edition" form="short">版</term>
30
- <term name="et-al">等人</term>
31
- <term name="forthcoming">將來的</term>
32
- <term name="from">從</term>
33
- <term name="ibid">同上出處</term>
34
- <term name="in">在</term>
35
- <term name="in press">印行中</term>
36
- <term name="internet">網際網路</term>
37
- <term name="interview">訪問</term>
38
- <term name="letter">信件</term>
39
- <term name="no date">no date</term>
40
- <term name="no date" form="short">無日期</term>
41
- <term name="online">在線上</term>
42
- <term name="presented at">簡報於</term>
43
- <term name="reference">
44
- <single>reference</single>
45
- <multiple>references</multiple>
46
- </term>
47
- <term name="reference" form="short">
48
- <single>ref.</single>
49
- <multiple>refs.</multiple>
50
- </term>
51
- <term name="retrieved">被取回</term>
52
-
53
- <!-- ANNO DOMINI; BEFORE CHRIST -->
54
- <term name="ad">AD</term>
55
- <term name="bc">BC</term>
56
-
57
- <!-- QUOTES -->
58
- <!-- Source: http://en.wikipedia.org/wiki/Non-English_usage_of_quotation_marks -->
59
- <term name="open-quote">「</term>
60
- <term name="close-quote">」</term>
61
- <term name="open-inner-quote">『</term>
62
- <term name="close-inner-quote">』</term>
63
-
64
- <!-- ORDINALS -->
65
- <term name="ordinal-01">st</term>
66
- <term name="ordinal-02">nd</term>
67
- <term name="ordinal-03">rd</term>
68
- <term name="ordinal-04">th</term>
69
-
70
- <!-- LONG ORDINALS -->
71
- <term name="long-ordinal-01">first</term>
72
- <term name="long-ordinal-02">second</term>
73
- <term name="long-ordinal-03">third</term>
74
- <term name="long-ordinal-04">fourth</term>
75
- <term name="long-ordinal-05">fifth</term>
76
- <term name="long-ordinal-06">sixth</term>
77
- <term name="long-ordinal-07">seventh</term>
78
- <term name="long-ordinal-08">eighth</term>
79
- <term name="long-ordinal-09">ninth</term>
80
- <term name="long-ordinal-10">tenth</term>
81
-
82
- <!-- CATEGORIES -->
83
- <term name="anthropology">人類學</term>
84
- <term name="astronomy">天文學</term>
85
- <term name="biology">生物學</term>
86
- <term name="botany">植物學</term>
87
- <term name="chemistry">化學</term>
88
- <term name="engineering">工程學</term>
89
- <term name="generic-base">一般基礎</term>
90
- <term name="geography">地理學</term>
91
- <term name="geology">地質學</term>
92
- <term name="history">歷史學</term>
93
- <term name="humanities">人文學科</term>
94
- <term name="linguistics">linguistics</term>
95
- <term name="literature">文學</term>
96
- <term name="math">數學</term>
97
- <term name="medicine">醫學</term>
98
- <term name="philosophy">哲學</term>
99
- <term name="physics">物理學</term>
100
- <term name="psychology">心理學</term>
101
- <term name="sociology">社會學</term>
102
- <term name="science">自然科學</term>
103
- <term name="political_science">政治科學</term>
104
- <term name="social_science">社會科學</term>
105
- <term name="theology">神學</term>
106
- <term name="zoology">動物學</term>
107
-
108
- <!-- LONG LOCATOR FORMS -->
109
- <term name="book">
110
- <single>書</single>
111
- <multiple>書</multiple>
112
- </term>
113
- <term name="chapter">
114
- <single>章</single>
115
- <multiple>章</multiple>
116
- </term>
117
- <term name="column">
118
- <single>欄</single>
119
- <multiple>欄</multiple>
120
- </term>
121
- <term name="figure">
122
- <single>圖</single>
123
- <multiple>圖</multiple>
124
- </term>
125
- <term name="folio">
126
- <single>對開紙</single>
127
- <multiple>對開紙</multiple>
128
- </term>
129
- <term name="issue">
130
- <single>期數</single>
131
- <multiple>期數</multiple>
132
- </term>
133
- <term name="line">
134
- <single>行</single>
135
- <multiple>行</multiple>
136
- </term>
137
- <term name="note">
138
- <single>筆記</single>
139
- <multiple>筆記</multiple>
140
- </term>
141
- <term name="opus">
142
- <single>作品</single>
143
- <multiple>作品</multiple>
144
- </term>
145
- <term name="page">
146
- <single>頁</single>
147
- <multiple>頁</multiple>
148
- </term>
149
- <term name="paragraph">
150
- <single>段落</single>
151
- <multiple>段落</multiple>
152
- </term>
153
- <term name="part">
154
- <single>部</single>
155
- <multiple>部</multiple>
156
- </term>
157
- <term name="section">
158
- <single>節</single>
159
- <multiple>節</multiple>
160
- </term>
161
- <term name="sub verbo">
162
- <single>sub verbo</single>
163
- <multiple>sub verbis</multiple>
164
- </term>
165
- <term name="verse">
166
- <single>詩句</single>
167
- <multiple>詩句</multiple>
168
- </term>
169
- <term name="volume">
170
- <single>冊</single>
171
- <multiple>冊</multiple>
172
- </term>
173
-
174
- <!-- SHORT LOCATOR FORMS -->
175
- <term name="book" form="short">書</term>
176
- <term name="chapter" form="short">章</term>
177
- <term name="column" form="short">欄</term>
178
- <term name="figure" form="short">圖</term>
179
- <term name="folio" form="short">開</term>
180
- <term name="issue" form="short">期</term>
181
- <term name="opus" form="short">作</term>
182
- <term name="page" form="short">
183
- <single>頁</single>
184
- <multiple>頁</multiple>
185
- </term>
186
- <term name="paragraph" form="short">段</term>
187
- <term name="part" form="short">部</term>
188
- <term name="section" form="short">節</term>
189
- <term name="sub verbo" form="short">
190
- <single>s.v.</single>
191
- <multiple>s.vv.</multiple>
192
- </term>
193
- <term name="verse" form="short">
194
- <single>句</single>
195
- <multiple>句</multiple>
196
- </term>
197
- <term name="volume" form="short">
198
- <single>冊</single>
199
- <multiple>冊</multiple>
200
- </term>
201
-
202
- <!-- SYMBOL LOCATOR FORMS -->
203
- <term name="paragraph" form="symbol">
204
- <single>¶</single>
205
- <multiple>¶¶</multiple>
206
- </term>
207
- <term name="section" form="symbol">
208
- <single>§</single>
209
- <multiple>§§</multiple>
210
- </term>
211
-
212
- <!-- LONG ROLE FORMS -->
213
- <term name="author">
214
- <single>作者</single>
215
- <multiple>作者</multiple>
216
- </term>
217
- <term name="editor">
218
- <single>編輯</single>
219
- <multiple>編輯</multiple>
220
- </term>
221
- <term name="editorial-director">
222
- <single>editor</single>
223
- <multiple>editors</multiple>
224
- </term>
225
- <term name="translator">
226
- <single>翻譯</single>
227
- <multiple>翻譯</multiple>
228
- </term>
229
- <term name="editortranslator">
230
- <single>editor &amp; translator</single>
231
- <multiple>editors &amp; translators</multiple>
232
- </term>
233
-
234
- <!-- SHORT ROLE FORMS -->
235
- <term name="author" form="short">
236
- <single>作</single>
237
- <multiple>作</multiple>
238
- </term>
239
- <term name="editor" form="short">
240
- <single>編</single>
241
- <multiple>編</multiple>
242
- </term>
243
- <term name="editorial-director" form="short">
244
- <single>ed.</single>
245
- <multiple>eds.</multiple>
246
- </term>
247
- <term name="translator" form="short">
248
- <single>譯</single>
249
- <multiple>譯</multiple>
250
- </term>
251
- <term name="editortranslator" form="short">
252
- <single>ed. &amp; tran.</single>
253
- <multiple>eds. &amp; trans.</multiple>
254
- </term>
255
-
256
- <!-- VERB ROLE FORMS -->
257
- <term name="editor" form="verb">編者是</term>
258
- <term name="editorial-director" form="verb">edited by</term>
259
- <term name="translator" form="verb">譯者是</term>
260
- <term name="editortranslator" form="verb">edited &amp; translated by</term>
261
- <term name="recipient" form="verb">授與</term>
262
- <term name="interviewer" form="verb">訪問者是</term>
263
-
264
- <!-- SHORT VERB ROLE FORMS -->
265
- <term name="container-author" form="verb-short">by</term>
266
- <term name="editor" form="verb-short">編</term>
267
- <term name="editorial-director" form="verb-short">ed.</term>
268
- <term name="translator" form="verb-short">譯</term>
269
- <term name="editortranslator" form="verb-short">ed. &amp; trans. by</term>
270
-
271
- <!-- LONG MONTH FORMS -->
272
- <term name="month-01">一月</term>
273
- <term name="month-02">二月</term>
274
- <term name="month-03">三月</term>
275
- <term name="month-04">四月</term>
276
- <term name="month-05">五月</term>
277
- <term name="month-06">六月</term>
278
- <term name="month-07">七月</term>
279
- <term name="month-08">八月</term>
280
- <term name="month-09">九月</term>
281
- <term name="month-10">十月</term>
282
- <term name="month-11">十一月</term>
283
- <term name="month-12">十二月</term>
284
-
285
- <!-- SHORT MONTH FORMS -->
286
- <term name="month-01" form="short">1月</term>
287
- <term name="month-02" form="short">2月</term>
288
- <term name="month-03" form="short">3月</term>
289
- <term name="month-04" form="short">4月</term>
290
- <term name="month-05" form="short">5月</term>
291
- <term name="month-06" form="short">6月</term>
292
- <term name="month-07" form="short">7月</term>
293
- <term name="month-08" form="short">8月</term>
294
- <term name="month-09" form="short">9月</term>
295
- <term name="month-10" form="short">10月</term>
296
- <term name="month-11" form="short">11月</term>
297
- <term name="month-12" form="short">12月</term>
298
-
299
- <!-- SEASONS -->
300
- <term name="season-01">Spring</term>
301
- <term name="season-02">Summer</term>
302
- <term name="season-03">Autumn</term>
303
- <term name="season-04">Winter</term>
304
- </terms>
305
- </locale>
@@ -1,39 +0,0 @@
1
- namespace cs = "http://purl.org/net/xbiblio/csl"
2
-
3
- div {
4
- info-format-categories = "author-date" | "numeric" | "label" | "note" | "author"
5
-
6
- ## "generic-base" is reserved for truly generic styles (APA, Harvard, etc.).
7
- info-field-categories =
8
- "anthropology"
9
- | "astronomy"
10
- | "biology"
11
- | "botany"
12
- | "chemistry"
13
- | "communications"
14
- | "engineering"
15
- | "generic-base"
16
- | "geography"
17
- | "geology"
18
- | "history"
19
- | "humanities"
20
- | "law"
21
- | "linguistics"
22
- | "literature"
23
- | "math"
24
- | "medicine"
25
- | "philosophy"
26
- | "physics"
27
- | "political_science"
28
- | "psychology"
29
- | "science"
30
- | "social_science"
31
- | "sociology"
32
- | "theology"
33
- | "zoology"
34
- | info-categories.extension
35
-
36
- ## Categories can be redefined in a customization schema, though please
37
- ## report obvious gaps for inclusion in the schema.
38
- info-categories.extension = notAllowed
39
- }
@@ -1,98 +0,0 @@
1
- namespace dc = "http://purl.org/dc/elements/1.1/"
2
-
3
- dc:title [ "Citation Style Language Data" ]
4
- dc:creator [ "Bruce D'Arcus" ]
5
- dc:copyright [ "Bruce D'Arcus, 2009" ]
6
- dc:description [ "A schema for the CSL data model." ]
7
- include "csl-types.rnc"
8
- include "csl-variables.rnc"
9
- start = element references { reference+ }
10
- reference = element reference { type, uri?, container-uri?, contributor*, date?, variable+ }
11
-
12
- ## Types
13
- div {
14
- type = attribute type { cs-types }
15
- }
16
-
17
- ## Identifiers
18
- div {
19
-
20
- ## The URI is the global identity for the refererence; used to associate a citation reference to its data
21
- uri = attribute uri { xsd:anyURI }
22
-
23
- ## the URI for containing items (such as edited books or journals)
24
- container-uri = attribute container-uri { xsd:anyURI }
25
- }
26
-
27
- ## Contributors
28
- div {
29
- contributor =
30
- element contributor {
31
- attribute type { cs-names },
32
- name-attributes
33
- }
34
- name-attributes =
35
- attribute literal { text }
36
- | ((attribute given { text }?,
37
- attribute family { text }?),
38
- attribute dropping-particle { text }?,
39
- attribute non-dropping-particle { text }?,
40
- attribute suffix { text }?)
41
- }
42
-
43
- ## Dates
44
- div {
45
- date =
46
- element date {
47
- attribute type { cs-dates },
48
- attribute circa { xsd:boolean }?,
49
- (date-pattern | date-range)
50
- }
51
- date-pattern =
52
- year-pattern,
53
- ( ( month-pattern, day-pattern? ) | season-pattern )?
54
- date-range =
55
- element begin-date { date-pattern },
56
- element end-date { date-pattern }?
57
- year-pattern =
58
- attribute year {
59
- xsd:integer { maxInclusive="-1" }
60
- | xsd:integer { minInclusive="1" }
61
- }
62
- month-pattern =
63
- attribute month { xsd:integer { minInclusive="1" maxInclusive="12" } }
64
- day-pattern =
65
- attribute day { xsd:integer { minInclusive="1" maxInclusive="31" } }
66
- season-pattern =
67
- attribute season { text }
68
- }
69
-
70
- ## Simple Variables
71
- div {
72
- variable =
73
- element variable {
74
- attribute type { cs-variables },
75
- (simple-variable-pattern | rich-variable-pattern)
76
- }
77
- simple-variable-pattern = text
78
- rich-variable-pattern =
79
- (text
80
- | element abbr { text }
81
- | element b { text }
82
- | element cite {
83
-
84
- ## cited title which is a part (like an article), and so typically rendered in quotes, rather than italicized
85
- attribute class { "part" }?,
86
- text
87
- }
88
- | element i { text }
89
- | element sc { text }
90
- | element span {
91
-
92
- ## text whose case should not be transformed (as with proper nouns)
93
- attribute class { "protect" }?,
94
- text
95
- }
96
- | element sup { text }
97
- | element sub { text })+
98
- }
@@ -1,106 +0,0 @@
1
- ## Terms
2
- div {
3
- cs-terms =
4
-
5
- ## Miscellaneous Terms
6
- "accessed"
7
- | "ad"
8
- | "and"
9
- | "and others"
10
- | "anonymous"
11
- | "at"
12
- | "bc"
13
- | "by"
14
- | "circa"
15
- | "cited"
16
- | "edition"
17
- | "et-al"
18
- | "forthcoming"
19
- | "from"
20
- | "ibid"
21
- | "in"
22
- | "in press"
23
- | "internet"
24
- | "interview"
25
- | "letter"
26
- | "no date"
27
- | "online"
28
- | "presented at"
29
- | "reference"
30
- | "retrieved"
31
- |
32
- ## Months
33
- "month-01"
34
- | "month-02"
35
- | "month-03"
36
- | "month-04"
37
- | "month-05"
38
- | "month-06"
39
- | "month-07"
40
- | "month-08"
41
- | "month-09"
42
- | "month-10"
43
- | "month-11"
44
- | "month-12"
45
- |
46
- ## Seasons
47
- "season-01"
48
- | "season-02"
49
- | "season-03"
50
- | "season-04"
51
- |
52
- ## Quotes
53
- "open-quote"
54
- | "close-quote"
55
- | "open-inner-quote"
56
- | "close-inner-quote"
57
- |
58
- ## Ordinals
59
- "ordinal-01"
60
- | "ordinal-02"
61
- | "ordinal-03"
62
- | "ordinal-04"
63
- |
64
- ## Long Ordinals
65
- "long-ordinal-01"
66
- | "long-ordinal-02"
67
- | "long-ordinal-03"
68
- | "long-ordinal-04"
69
- | "long-ordinal-05"
70
- | "long-ordinal-06"
71
- | "long-ordinal-07"
72
- | "long-ordinal-08"
73
- | "long-ordinal-09"
74
- | "long-ordinal-10"
75
- |
76
- ## Contributor Roles
77
- cs-names
78
- | "editortranslator"
79
- |
80
- ## Categories
81
- info-field-categories
82
- |
83
- ## Locators
84
- cs-terms.locator
85
- | cs-terms.extension
86
-
87
- ## Locators
88
- cs-terms.locator =
89
- "book"
90
- | "chapter"
91
- | "column"
92
- | "figure"
93
- | "folio"
94
- | "issue"
95
- | "line"
96
- | "note"
97
- | "opus"
98
- | "page"
99
- | "paragraph"
100
- | "part"
101
- | "section"
102
- | "sub verbo"
103
- | "verse"
104
- | "volume"
105
- }
106
-