csl 1.0.0.pre8 → 1.0.0.pre9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/csl/style/date.rb +84 -7
- data/lib/csl/style/number.rb +12 -5
- data/lib/csl/version.rb +1 -1
- data/spec/fixtures/locales/locales-de-DE.xml +35 -33
- data/spec/fixtures/locales/locales-en-GB.xml +38 -30
- data/spec/fixtures/locales/locales-en-US.xml +38 -30
- data/spec/fixtures/styles/apa.csl +21 -18
- data/vendor/schema/csl-terms.rng +16 -6
- data/vendor/schema/csl.rng +39 -2
- metadata +11 -11
data/lib/csl/style/date.rb
CHANGED
@@ -1,16 +1,93 @@
|
|
1
1
|
module CSL
|
2
2
|
class Style
|
3
|
-
|
3
|
+
|
4
4
|
class Date < Node
|
5
|
+
|
6
|
+
attr_defaults :'date-parts' => 'year-month-day'
|
7
|
+
|
5
8
|
attr_struct :name, :form, :'range-delimiter', :'date-parts', :variable,
|
6
|
-
|
9
|
+
*Schema.attr(:display, :formatting, :delimiter)
|
10
|
+
|
11
|
+
attr_children :'date-part'
|
12
|
+
|
13
|
+
alias date_parts date_part
|
14
|
+
alias parts date_part
|
15
|
+
|
16
|
+
private :date_part
|
17
|
+
|
18
|
+
def initialize(attributes = {})
|
19
|
+
super(attributes, &nil)
|
20
|
+
children[:'date-part'] = []
|
21
|
+
|
22
|
+
yield self if block_given?
|
23
|
+
end
|
24
|
+
|
25
|
+
def delimiter
|
26
|
+
attributes.fetch(:delimiter, '')
|
27
|
+
end
|
28
|
+
|
29
|
+
def has_variable?
|
30
|
+
attribute?(:variable)
|
31
|
+
end
|
32
|
+
|
33
|
+
def variable
|
34
|
+
attributes[:variable]
|
35
|
+
end
|
36
|
+
|
37
|
+
def has_form?
|
38
|
+
attribute?(:form)
|
39
|
+
end
|
40
|
+
|
41
|
+
def form
|
42
|
+
attributes[:form]
|
43
|
+
end
|
44
|
+
|
45
|
+
def has_date_parts?
|
46
|
+
!date_parts.empty?
|
47
|
+
end
|
48
|
+
alias has_parts? has_date_parts?
|
49
|
+
|
7
50
|
end
|
8
|
-
|
51
|
+
|
9
52
|
class DatePart < Node
|
10
|
-
attr_struct :name, :form, :'range-delimiter',
|
11
|
-
*Schema.attr(:
|
53
|
+
attr_struct :name, :form, :'range-delimiter',
|
54
|
+
*Schema.attr(:formatting, :periods)
|
55
|
+
|
56
|
+
def range_delimiter
|
57
|
+
attributes.fetch(:'range-delimiter', '')
|
58
|
+
end
|
59
|
+
|
60
|
+
def name
|
61
|
+
attributes[:name].to_s
|
62
|
+
end
|
63
|
+
|
64
|
+
def has_form?
|
65
|
+
attribute?(:form)
|
66
|
+
end
|
67
|
+
|
68
|
+
def form
|
69
|
+
case
|
70
|
+
when has_form?
|
71
|
+
attributes[:form]
|
72
|
+
when has_parent?
|
73
|
+
parent.form
|
74
|
+
else
|
75
|
+
nil
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def year?
|
80
|
+
name =~ /year/i
|
81
|
+
end
|
82
|
+
|
83
|
+
def month?
|
84
|
+
name =~ /month/i
|
85
|
+
end
|
86
|
+
|
87
|
+
def day?
|
88
|
+
name =~ /day/i
|
89
|
+
end
|
12
90
|
end
|
13
|
-
|
14
|
-
|
91
|
+
|
15
92
|
end
|
16
93
|
end
|
data/lib/csl/style/number.rb
CHANGED
@@ -15,28 +15,35 @@ module CSL
|
|
15
15
|
attributes[:variable]
|
16
16
|
end
|
17
17
|
|
18
|
+
def has_form?
|
19
|
+
attribute?(:form)
|
20
|
+
end
|
21
|
+
|
22
|
+
def form
|
23
|
+
attributes[:form]
|
24
|
+
end
|
25
|
+
|
18
26
|
# @return [Boolean] whether or not the number's format is set to
|
19
27
|
# :numeric; also returns true if the number's form attribute is not
|
20
28
|
# set or nil.
|
21
29
|
def numeric?
|
22
|
-
!
|
30
|
+
!has_form? || form.to_sym == :numeric
|
23
31
|
end
|
24
32
|
|
25
33
|
# @return [Boolean] whether or not the number's format is set to :ordinal
|
26
34
|
def ordinal?
|
27
|
-
|
35
|
+
has_form? && form.to_sym == :ordinal
|
28
36
|
end
|
29
37
|
|
30
38
|
# @return [Boolean] whether or not the number's format is set to :'long-ordinal'
|
31
39
|
def long_ordinal?
|
32
|
-
|
40
|
+
has_form? && form.to_sym == :'long-ordinal'
|
33
41
|
end
|
34
42
|
|
35
43
|
# @return [Boolean] whether or not the number's format is set to :roman
|
36
44
|
def roman?
|
37
|
-
|
45
|
+
has_form? && form.to_sym == :roman
|
38
46
|
end
|
39
|
-
|
40
47
|
end
|
41
48
|
|
42
49
|
end
|
data/lib/csl/version.rb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
2
2
|
<locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0" xml:lang="de-DE">
|
3
|
+
<info>
|
4
|
+
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
5
|
+
<updated>2012-07-04T23:31:02+00:00</updated>
|
6
|
+
</info>
|
3
7
|
<style-options punctuation-in-quote="false"/>
|
4
8
|
<date form="text">
|
5
9
|
<date-part name="day" suffix=". "/>
|
@@ -18,6 +22,7 @@
|
|
18
22
|
<term name="anonymous">ohne Autor</term>
|
19
23
|
<term name="anonymous" form="short">o. A.</term>
|
20
24
|
<term name="at">auf</term>
|
25
|
+
<term name="available at">available at</term>
|
21
26
|
<term name="by">von</term>
|
22
27
|
<term name="circa">circa</term>
|
23
28
|
<term name="circa" form="short">ca.</term>
|
@@ -49,22 +54,22 @@
|
|
49
54
|
<multiple>Ref.</multiple>
|
50
55
|
</term>
|
51
56
|
<term name="retrieved">abgerufen</term>
|
57
|
+
<term name="scale">scale</term>
|
58
|
+
<term name="version">version</term>
|
52
59
|
|
53
60
|
<!-- ANNO DOMINI; BEFORE CHRIST -->
|
54
61
|
<term name="ad">n. Chr.</term>
|
55
62
|
<term name="bc">v. Chr.</term>
|
56
63
|
|
57
|
-
<!--
|
64
|
+
<!-- PUNCTUATION -->
|
58
65
|
<term name="open-quote">„</term>
|
59
66
|
<term name="close-quote">“</term>
|
60
67
|
<term name="open-inner-quote">‚</term>
|
61
68
|
<term name="close-inner-quote">‘</term>
|
69
|
+
<term name="page-range-delimiter">–</term>
|
62
70
|
|
63
71
|
<!-- ORDINALS -->
|
64
|
-
<term name="ordinal
|
65
|
-
<term name="ordinal-02">.</term>
|
66
|
-
<term name="ordinal-03">.</term>
|
67
|
-
<term name="ordinal-04">.</term>
|
72
|
+
<term name="ordinal">.</term>
|
68
73
|
|
69
74
|
<!-- LONG ORDINALS -->
|
70
75
|
<term name="long-ordinal-01">erster</term>
|
@@ -78,32 +83,6 @@
|
|
78
83
|
<term name="long-ordinal-09">neunter</term>
|
79
84
|
<term name="long-ordinal-10">zehnter</term>
|
80
85
|
|
81
|
-
<!-- CATEGORIES -->
|
82
|
-
<term name="anthropology">Anthropologie</term>
|
83
|
-
<term name="astronomy">Astronomie</term>
|
84
|
-
<term name="biology">Biologie</term>
|
85
|
-
<term name="botany">Botanik</term>
|
86
|
-
<term name="chemistry">Chemie</term>
|
87
|
-
<term name="engineering">Ingenieurswissenschaften</term>
|
88
|
-
<term name="generic-base">generischer Stil</term>
|
89
|
-
<term name="geography">Geographie</term>
|
90
|
-
<term name="geology">Geologie</term>
|
91
|
-
<term name="history">Geschichte</term>
|
92
|
-
<term name="humanities">Geisteswissenschaften</term>
|
93
|
-
<term name="linguistics">Linguistik</term>
|
94
|
-
<term name="literature">Literatur</term>
|
95
|
-
<term name="math">Mathematik</term>
|
96
|
-
<term name="medicine">Medizin</term>
|
97
|
-
<term name="philosophy">Philosophie</term>
|
98
|
-
<term name="physics">Physik</term>
|
99
|
-
<term name="psychology">Psychologie</term>
|
100
|
-
<term name="sociology">Soziologie</term>
|
101
|
-
<term name="science">Naturwissenschaften</term>
|
102
|
-
<term name="political_science">Politikwissenschaft</term>
|
103
|
-
<term name="social_science">Sozialwissenschaften</term>
|
104
|
-
<term name="theology">Theologie</term>
|
105
|
-
<term name="zoology">Zoologie</term>
|
106
|
-
|
107
86
|
<!-- LONG LOCATOR FORMS -->
|
108
87
|
<term name="book">
|
109
88
|
<single>Buch</single>
|
@@ -177,6 +156,8 @@
|
|
177
156
|
<term name="figure" form="short">Abb.</term>
|
178
157
|
<term name="folio" form="short">Fol.</term>
|
179
158
|
<term name="issue" form="short">Nr.</term>
|
159
|
+
<term name="line" form="short">l.</term>
|
160
|
+
<term name="note" form="short">n.</term>
|
180
161
|
<term name="opus" form="short">op.</term>
|
181
162
|
<term name="page" form="short">
|
182
163
|
<single>S.</single>
|
@@ -213,6 +194,10 @@
|
|
213
194
|
<single/>
|
214
195
|
<multiple/>
|
215
196
|
</term>
|
197
|
+
<term name="director">
|
198
|
+
<single>director</single>
|
199
|
+
<multiple>directors</multiple>
|
200
|
+
</term>
|
216
201
|
<term name="editor">
|
217
202
|
<single>Herausgeber</single>
|
218
203
|
<multiple>Herausgeber</multiple>
|
@@ -221,6 +206,10 @@
|
|
221
206
|
<single>Herausgeber</single>
|
222
207
|
<multiple>Herausgeber</multiple>
|
223
208
|
</term>
|
209
|
+
<term name="illustrator">
|
210
|
+
<single>illustrator</single>
|
211
|
+
<multiple>illustrators</multiple>
|
212
|
+
</term>
|
224
213
|
<term name="translator">
|
225
214
|
<single>Übersetzer</single>
|
226
215
|
<multiple>Übersetzer</multiple>
|
@@ -235,6 +224,10 @@
|
|
235
224
|
<single/>
|
236
225
|
<multiple/>
|
237
226
|
</term>
|
227
|
+
<term name="director" form="short">
|
228
|
+
<single>dir.</single>
|
229
|
+
<multiple>dirs.</multiple>
|
230
|
+
</term>
|
238
231
|
<term name="editor" form="short">
|
239
232
|
<single>Hrsg.</single>
|
240
233
|
<multiple>Hrsg.</multiple>
|
@@ -243,6 +236,10 @@
|
|
243
236
|
<single>Hrsg.</single>
|
244
237
|
<multiple>Hrsg.</multiple>
|
245
238
|
</term>
|
239
|
+
<term name="illustrator" form="short">
|
240
|
+
<single>ill.</single>
|
241
|
+
<multiple>ills.</multiple>
|
242
|
+
</term>
|
246
243
|
<term name="translator" form="short">
|
247
244
|
<single>Übers.</single>
|
248
245
|
<multiple>Übers.</multiple>
|
@@ -253,17 +250,22 @@
|
|
253
250
|
</term>
|
254
251
|
|
255
252
|
<!-- VERB ROLE FORMS -->
|
253
|
+
<term name="director" form="verb">directed by</term>
|
256
254
|
<term name="editor" form="verb">herausgegeben von</term>
|
257
255
|
<term name="editorial-director" form="verb">herausgegeben von</term>
|
256
|
+
<term name="illustrator" form="verb">illustrated by</term>
|
257
|
+
<term name="interviewer" form="verb">interviewt von</term>
|
258
|
+
<term name="recipient" form="verb">an</term>
|
259
|
+
<term name="reviewed-author" form="verb">by</term>
|
258
260
|
<term name="translator" form="verb">übersetzt von</term>
|
259
261
|
<term name="editortranslator" form="verb">herausgegeben und übersetzt von</term>
|
260
|
-
<term name="recipient" form="verb">an</term>
|
261
|
-
<term name="interviewer" form="verb">interviewt von</term>
|
262
262
|
|
263
263
|
<!-- SHORT VERB ROLE FORMS -->
|
264
264
|
<term name="container-author" form="verb-short">von</term>
|
265
|
+
<term name="director" form="verb-short">dir.</term>
|
265
266
|
<term name="editor" form="verb-short">hg. von</term>
|
266
267
|
<term name="editorial-director" form="verb-short">hg. von</term>
|
268
|
+
<term name="illustrator" form="verb-short">illus.</term>
|
267
269
|
<term name="translator" form="verb-short">übers. von</term>
|
268
270
|
<term name="editortranslator" form="verb-short">hg. & übers. von</term>
|
269
271
|
|
@@ -1,5 +1,9 @@
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
2
2
|
<locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0" xml:lang="en-GB">
|
3
|
+
<info>
|
4
|
+
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
5
|
+
<updated>2012-07-04T23:31:02+00:00</updated>
|
6
|
+
</info>
|
3
7
|
<style-options punctuation-in-quote="false"/>
|
4
8
|
<date form="text">
|
5
9
|
<date-part name="day" suffix=" "/>
|
@@ -18,6 +22,7 @@
|
|
18
22
|
<term name="anonymous">anonymous</term>
|
19
23
|
<term name="anonymous" form="short">anon.</term>
|
20
24
|
<term name="at">at</term>
|
25
|
+
<term name="available at">available at</term>
|
21
26
|
<term name="by">by</term>
|
22
27
|
<term name="circa">circa</term>
|
23
28
|
<term name="circa" form="short">c.</term>
|
@@ -49,22 +54,28 @@
|
|
49
54
|
<multiple>refs.</multiple>
|
50
55
|
</term>
|
51
56
|
<term name="retrieved">retrieved</term>
|
57
|
+
<term name="scale">scale</term>
|
58
|
+
<term name="version">version</term>
|
52
59
|
|
53
60
|
<!-- ANNO DOMINI; BEFORE CHRIST -->
|
54
61
|
<term name="ad">AD</term>
|
55
62
|
<term name="bc">BC</term>
|
56
63
|
|
57
|
-
<!--
|
64
|
+
<!-- PUNCTUATION -->
|
58
65
|
<term name="open-quote">‘</term>
|
59
66
|
<term name="close-quote">’</term>
|
60
67
|
<term name="open-inner-quote">“</term>
|
61
68
|
<term name="close-inner-quote">”</term>
|
69
|
+
<term name="page-range-delimiter">–</term>
|
62
70
|
|
63
71
|
<!-- ORDINALS -->
|
72
|
+
<term name="ordinal">th</term>
|
64
73
|
<term name="ordinal-01">st</term>
|
65
74
|
<term name="ordinal-02">nd</term>
|
66
75
|
<term name="ordinal-03">rd</term>
|
67
|
-
<term name="ordinal-
|
76
|
+
<term name="ordinal-11">th</term>
|
77
|
+
<term name="ordinal-12">th</term>
|
78
|
+
<term name="ordinal-13">th</term>
|
68
79
|
|
69
80
|
<!-- LONG ORDINALS -->
|
70
81
|
<term name="long-ordinal-01">first</term>
|
@@ -78,32 +89,6 @@
|
|
78
89
|
<term name="long-ordinal-09">ninth</term>
|
79
90
|
<term name="long-ordinal-10">tenth</term>
|
80
91
|
|
81
|
-
<!-- CATEGORIES -->
|
82
|
-
<term name="anthropology">anthropology</term>
|
83
|
-
<term name="astronomy">astronomy</term>
|
84
|
-
<term name="biology">biology</term>
|
85
|
-
<term name="botany">botany</term>
|
86
|
-
<term name="chemistry">chemistry</term>
|
87
|
-
<term name="engineering">engineering</term>
|
88
|
-
<term name="generic-base">generic base</term>
|
89
|
-
<term name="geography">geography</term>
|
90
|
-
<term name="geology">geology</term>
|
91
|
-
<term name="history">history</term>
|
92
|
-
<term name="humanities">humanities</term>
|
93
|
-
<term name="linguistics">linguistics</term>
|
94
|
-
<term name="literature">literature</term>
|
95
|
-
<term name="math">math</term>
|
96
|
-
<term name="medicine">medicine</term>
|
97
|
-
<term name="philosophy">philosophy</term>
|
98
|
-
<term name="physics">physics</term>
|
99
|
-
<term name="psychology">psychology</term>
|
100
|
-
<term name="sociology">sociology</term>
|
101
|
-
<term name="science">science</term>
|
102
|
-
<term name="political_science">political science</term>
|
103
|
-
<term name="social_science">social science</term>
|
104
|
-
<term name="theology">theology</term>
|
105
|
-
<term name="zoology">zoology</term>
|
106
|
-
|
107
92
|
<!-- LONG LOCATOR FORMS -->
|
108
93
|
<term name="book">
|
109
94
|
<single>book</single>
|
@@ -177,6 +162,8 @@
|
|
177
162
|
<term name="figure" form="short">fig.</term>
|
178
163
|
<term name="folio" form="short">f.</term>
|
179
164
|
<term name="issue" form="short">no.</term>
|
165
|
+
<term name="line" form="short">l.</term>
|
166
|
+
<term name="note" form="short">n.</term>
|
180
167
|
<term name="opus" form="short">op.</term>
|
181
168
|
<term name="page" form="short">
|
182
169
|
<single>p.</single>
|
@@ -213,6 +200,10 @@
|
|
213
200
|
<single/>
|
214
201
|
<multiple/>
|
215
202
|
</term>
|
203
|
+
<term name="director">
|
204
|
+
<single>director</single>
|
205
|
+
<multiple>directors</multiple>
|
206
|
+
</term>
|
216
207
|
<term name="editor">
|
217
208
|
<single>editor</single>
|
218
209
|
<multiple>editors</multiple>
|
@@ -221,6 +212,10 @@
|
|
221
212
|
<single>editor</single>
|
222
213
|
<multiple>editors</multiple>
|
223
214
|
</term>
|
215
|
+
<term name="illustrator">
|
216
|
+
<single>illustrator</single>
|
217
|
+
<multiple>illustrators</multiple>
|
218
|
+
</term>
|
224
219
|
<term name="translator">
|
225
220
|
<single>translator</single>
|
226
221
|
<multiple>translators</multiple>
|
@@ -235,6 +230,10 @@
|
|
235
230
|
<single/>
|
236
231
|
<multiple/>
|
237
232
|
</term>
|
233
|
+
<term name="director" form="short">
|
234
|
+
<single>dir.</single>
|
235
|
+
<multiple>dirs.</multiple>
|
236
|
+
</term>
|
238
237
|
<term name="editor" form="short">
|
239
238
|
<single>ed.</single>
|
240
239
|
<multiple>eds.</multiple>
|
@@ -243,6 +242,10 @@
|
|
243
242
|
<single>ed.</single>
|
244
243
|
<multiple>eds.</multiple>
|
245
244
|
</term>
|
245
|
+
<term name="illustrator" form="short">
|
246
|
+
<single>ill.</single>
|
247
|
+
<multiple>ills.</multiple>
|
248
|
+
</term>
|
246
249
|
<term name="translator" form="short">
|
247
250
|
<single>tran.</single>
|
248
251
|
<multiple>trans.</multiple>
|
@@ -253,17 +256,22 @@
|
|
253
256
|
</term>
|
254
257
|
|
255
258
|
<!-- VERB ROLE FORMS -->
|
259
|
+
<term name="director" form="verb">directed by</term>
|
256
260
|
<term name="editor" form="verb">edited by</term>
|
257
261
|
<term name="editorial-director" form="verb">edited by</term>
|
262
|
+
<term name="illustrator" form="verb">illustrated by</term>
|
263
|
+
<term name="interviewer" form="verb">interview by</term>
|
264
|
+
<term name="recipient" form="verb">to</term>
|
265
|
+
<term name="reviewed-author" form="verb">by</term>
|
258
266
|
<term name="translator" form="verb">translated by</term>
|
259
267
|
<term name="editortranslator" form="verb">edited & translated by</term>
|
260
|
-
<term name="recipient" form="verb">to</term>
|
261
|
-
<term name="interviewer" form="verb">interview by</term>
|
262
268
|
|
263
269
|
<!-- SHORT VERB ROLE FORMS -->
|
264
270
|
<term name="container-author" form="verb-short">by</term>
|
271
|
+
<term name="director" form="verb-short">dir.</term>
|
265
272
|
<term name="editor" form="verb-short">ed.</term>
|
266
273
|
<term name="editorial-director" form="verb-short">ed.</term>
|
274
|
+
<term name="illustrator" form="verb-short">illus.</term>
|
267
275
|
<term name="translator" form="verb-short">trans.</term>
|
268
276
|
<term name="editortranslator" form="verb-short">ed. & trans. by</term>
|
269
277
|
|
@@ -1,5 +1,9 @@
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
2
2
|
<locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0" xml:lang="en-US">
|
3
|
+
<info>
|
4
|
+
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
5
|
+
<updated>2012-07-04T23:31:02+00:00</updated>
|
6
|
+
</info>
|
3
7
|
<style-options punctuation-in-quote="true"/>
|
4
8
|
<date form="text">
|
5
9
|
<date-part name="month" suffix=" "/>
|
@@ -18,6 +22,7 @@
|
|
18
22
|
<term name="anonymous">anonymous</term>
|
19
23
|
<term name="anonymous" form="short">anon.</term>
|
20
24
|
<term name="at">at</term>
|
25
|
+
<term name="available at">available at</term>
|
21
26
|
<term name="by">by</term>
|
22
27
|
<term name="circa">circa</term>
|
23
28
|
<term name="circa" form="short">c.</term>
|
@@ -49,22 +54,28 @@
|
|
49
54
|
<multiple>refs.</multiple>
|
50
55
|
</term>
|
51
56
|
<term name="retrieved">retrieved</term>
|
57
|
+
<term name="scale">scale</term>
|
58
|
+
<term name="version">version</term>
|
52
59
|
|
53
60
|
<!-- ANNO DOMINI; BEFORE CHRIST -->
|
54
61
|
<term name="ad">AD</term>
|
55
62
|
<term name="bc">BC</term>
|
56
63
|
|
57
|
-
<!--
|
64
|
+
<!-- PUNCTUATION -->
|
58
65
|
<term name="open-quote">“</term>
|
59
66
|
<term name="close-quote">”</term>
|
60
67
|
<term name="open-inner-quote">‘</term>
|
61
68
|
<term name="close-inner-quote">’</term>
|
69
|
+
<term name="page-range-delimiter">–</term>
|
62
70
|
|
63
71
|
<!-- ORDINALS -->
|
72
|
+
<term name="ordinal">th</term>
|
64
73
|
<term name="ordinal-01">st</term>
|
65
74
|
<term name="ordinal-02">nd</term>
|
66
75
|
<term name="ordinal-03">rd</term>
|
67
|
-
<term name="ordinal-
|
76
|
+
<term name="ordinal-11">th</term>
|
77
|
+
<term name="ordinal-12">th</term>
|
78
|
+
<term name="ordinal-13">th</term>
|
68
79
|
|
69
80
|
<!-- LONG ORDINALS -->
|
70
81
|
<term name="long-ordinal-01">first</term>
|
@@ -78,32 +89,6 @@
|
|
78
89
|
<term name="long-ordinal-09">ninth</term>
|
79
90
|
<term name="long-ordinal-10">tenth</term>
|
80
91
|
|
81
|
-
<!-- CATEGORIES -->
|
82
|
-
<term name="anthropology">anthropology</term>
|
83
|
-
<term name="astronomy">astronomy</term>
|
84
|
-
<term name="biology">biology</term>
|
85
|
-
<term name="botany">botany</term>
|
86
|
-
<term name="chemistry">chemistry</term>
|
87
|
-
<term name="engineering">engineering</term>
|
88
|
-
<term name="generic-base">generic base</term>
|
89
|
-
<term name="geography">geography</term>
|
90
|
-
<term name="geology">geology</term>
|
91
|
-
<term name="history">history</term>
|
92
|
-
<term name="humanities">humanities</term>
|
93
|
-
<term name="linguistics">linguistics</term>
|
94
|
-
<term name="literature">literature</term>
|
95
|
-
<term name="math">math</term>
|
96
|
-
<term name="medicine">medicine</term>
|
97
|
-
<term name="philosophy">philosophy</term>
|
98
|
-
<term name="physics">physics</term>
|
99
|
-
<term name="psychology">psychology</term>
|
100
|
-
<term name="sociology">sociology</term>
|
101
|
-
<term name="science">science</term>
|
102
|
-
<term name="political_science">political science</term>
|
103
|
-
<term name="social_science">social science</term>
|
104
|
-
<term name="theology">theology</term>
|
105
|
-
<term name="zoology">zoology</term>
|
106
|
-
|
107
92
|
<!-- LONG LOCATOR FORMS -->
|
108
93
|
<term name="book">
|
109
94
|
<single>book</single>
|
@@ -177,6 +162,8 @@
|
|
177
162
|
<term name="figure" form="short">fig.</term>
|
178
163
|
<term name="folio" form="short">f.</term>
|
179
164
|
<term name="issue" form="short">no.</term>
|
165
|
+
<term name="line" form="short">l.</term>
|
166
|
+
<term name="note" form="short">n.</term>
|
180
167
|
<term name="opus" form="short">op.</term>
|
181
168
|
<term name="page" form="short">
|
182
169
|
<single>p.</single>
|
@@ -213,6 +200,10 @@
|
|
213
200
|
<single/>
|
214
201
|
<multiple/>
|
215
202
|
</term>
|
203
|
+
<term name="director">
|
204
|
+
<single>director</single>
|
205
|
+
<multiple>directors</multiple>
|
206
|
+
</term>
|
216
207
|
<term name="editor">
|
217
208
|
<single>editor</single>
|
218
209
|
<multiple>editors</multiple>
|
@@ -221,6 +212,10 @@
|
|
221
212
|
<single>editor</single>
|
222
213
|
<multiple>editors</multiple>
|
223
214
|
</term>
|
215
|
+
<term name="illustrator">
|
216
|
+
<single>illustrator</single>
|
217
|
+
<multiple>illustrators</multiple>
|
218
|
+
</term>
|
224
219
|
<term name="translator">
|
225
220
|
<single>translator</single>
|
226
221
|
<multiple>translators</multiple>
|
@@ -235,6 +230,10 @@
|
|
235
230
|
<single/>
|
236
231
|
<multiple/>
|
237
232
|
</term>
|
233
|
+
<term name="director" form="short">
|
234
|
+
<single>dir.</single>
|
235
|
+
<multiple>dirs.</multiple>
|
236
|
+
</term>
|
238
237
|
<term name="editor" form="short">
|
239
238
|
<single>ed.</single>
|
240
239
|
<multiple>eds.</multiple>
|
@@ -243,6 +242,10 @@
|
|
243
242
|
<single>ed.</single>
|
244
243
|
<multiple>eds.</multiple>
|
245
244
|
</term>
|
245
|
+
<term name="illustrator" form="short">
|
246
|
+
<single>ill.</single>
|
247
|
+
<multiple>ills.</multiple>
|
248
|
+
</term>
|
246
249
|
<term name="translator" form="short">
|
247
250
|
<single>tran.</single>
|
248
251
|
<multiple>trans.</multiple>
|
@@ -253,17 +256,22 @@
|
|
253
256
|
</term>
|
254
257
|
|
255
258
|
<!-- VERB ROLE FORMS -->
|
259
|
+
<term name="director" form="verb">directed by</term>
|
256
260
|
<term name="editor" form="verb">edited by</term>
|
257
261
|
<term name="editorial-director" form="verb">edited by</term>
|
262
|
+
<term name="illustrator" form="verb">illustrated by</term>
|
263
|
+
<term name="interviewer" form="verb">interview by</term>
|
264
|
+
<term name="recipient" form="verb">to</term>
|
265
|
+
<term name="reviewed-author" form="verb">by</term>
|
258
266
|
<term name="translator" form="verb">translated by</term>
|
259
267
|
<term name="editortranslator" form="verb">edited & translated by</term>
|
260
|
-
<term name="recipient" form="verb">to</term>
|
261
|
-
<term name="interviewer" form="verb">interview by</term>
|
262
268
|
|
263
269
|
<!-- SHORT VERB ROLE FORMS -->
|
264
270
|
<term name="container-author" form="verb-short">by</term>
|
271
|
+
<term name="director" form="verb-short">dir.</term>
|
265
272
|
<term name="editor" form="verb-short">ed.</term>
|
266
273
|
<term name="editorial-director" form="verb-short">ed.</term>
|
274
|
+
<term name="illustrator" form="verb-short">illus.</term>
|
267
275
|
<term name="translator" form="verb-short">trans.</term>
|
268
276
|
<term name="editortranslator" form="verb-short">ed. & trans. by</term>
|
269
277
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
2
2
|
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never">
|
3
|
+
<!-- This style was edited with the Visual CSL Editor (http://steveridout.com/csl/visualEditor/) -->
|
3
4
|
<info>
|
4
5
|
<title>American Psychological Association 6th Edition</title>
|
5
6
|
<id>http://www.zotero.org/styles/apa</id>
|
@@ -23,10 +24,10 @@
|
|
23
24
|
<contributor>
|
24
25
|
<name>Sebastian Karcher</name>
|
25
26
|
</contributor>
|
27
|
+
<category citation-format="author-date"/>
|
26
28
|
<category field="psychology"/>
|
27
29
|
<category field="generic-base"/>
|
28
|
-
<
|
29
|
-
<updated>2010-01-27T20:08:03+00:00</updated>
|
30
|
+
<updated>2012-09-04T02:31:02+00:00</updated>
|
30
31
|
<rights>This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/</rights>
|
31
32
|
</info>
|
32
33
|
<locale xml:lang="en">
|
@@ -40,7 +41,6 @@
|
|
40
41
|
<macro name="container-contributors">
|
41
42
|
<choose>
|
42
43
|
<if type="chapter paper-conference" match="any">
|
43
|
-
<text term="in" text-case="capitalize-first" suffix=" "/>
|
44
44
|
<names variable="editor" delimiter=", " suffix=", ">
|
45
45
|
<name and="symbol" initialize-with=". " delimiter=", "/>
|
46
46
|
<label form="short" prefix=" (" text-case="capitalize-first" suffix=")"/>
|
@@ -233,7 +233,7 @@
|
|
233
233
|
<if type="bill legal_case legislation" match="none">
|
234
234
|
<choose>
|
235
235
|
<if variable="issued">
|
236
|
-
<group prefix=" (" suffix=")
|
236
|
+
<group prefix=" (" suffix=")">
|
237
237
|
<date variable="issued">
|
238
238
|
<date-part name="year"/>
|
239
239
|
</date>
|
@@ -249,7 +249,7 @@
|
|
249
249
|
</group>
|
250
250
|
</if>
|
251
251
|
<else>
|
252
|
-
<group prefix=" (" suffix=")
|
252
|
+
<group prefix=" (" suffix=")">
|
253
253
|
<text term="no date" form="short"/>
|
254
254
|
<text variable="year-suffix" prefix="-"/>
|
255
255
|
</group>
|
@@ -359,6 +359,18 @@
|
|
359
359
|
</group>
|
360
360
|
</macro>
|
361
361
|
<macro name="container">
|
362
|
+
<group>
|
363
|
+
<choose>
|
364
|
+
<if type="chapter paper-conference entry-encyclopedia" match="any">
|
365
|
+
<text term="in" text-case="capitalize-first" suffix=" "/>
|
366
|
+
</if>
|
367
|
+
</choose>
|
368
|
+
<text macro="container-contributors"/>
|
369
|
+
<text macro="secondary-contributors"/>
|
370
|
+
<text macro="container-title"/>
|
371
|
+
</group>
|
372
|
+
</macro>
|
373
|
+
<macro name="container-title">
|
362
374
|
<choose>
|
363
375
|
<if type="bill legal_case legislation" match="none">
|
364
376
|
<text variable="container-title" font-style="italic"/>
|
@@ -370,7 +382,7 @@
|
|
370
382
|
<text variable="volume"/>
|
371
383
|
<text variable="container-title"/>
|
372
384
|
<group delimiter=" ">
|
373
|
-
|
385
|
+
<!--change to label variable="section" as that becomes available -->
|
374
386
|
<text term="section" form="symbol"/>
|
375
387
|
<text variable="section"/>
|
376
388
|
</group>
|
@@ -384,7 +396,7 @@
|
|
384
396
|
<else>
|
385
397
|
<text variable="number" prefix="Pub. L. No. "/>
|
386
398
|
<group delimiter=" ">
|
387
|
-
|
399
|
+
<!--change to label variable="section" as that becomes available -->
|
388
400
|
<text term="section" form="symbol"/>
|
389
401
|
<text variable="section"/>
|
390
402
|
</group>
|
@@ -409,7 +421,7 @@
|
|
409
421
|
</group>
|
410
422
|
</layout>
|
411
423
|
</citation>
|
412
|
-
<bibliography hanging-indent="true" et-al-min="8" et-al-use-first="
|
424
|
+
<bibliography hanging-indent="true" et-al-min="8" et-al-use-first="6" et-al-use-last="true" entry-spacing="0" line-spacing="2">
|
413
425
|
<sort>
|
414
426
|
<key macro="author"/>
|
415
427
|
<key macro="issued-sort" sort="ascending"/>
|
@@ -419,17 +431,8 @@
|
|
419
431
|
<group delimiter=". ">
|
420
432
|
<text macro="author"/>
|
421
433
|
<text macro="issued"/>
|
422
|
-
</group>
|
423
|
-
<group delimiter=". ">
|
424
434
|
<text macro="title" prefix=" "/>
|
425
|
-
|
426
|
-
<text macro="container-contributors"/>
|
427
|
-
<text macro="secondary-contributors"/>
|
428
|
-
<group delimiter=", ">
|
429
|
-
<text macro="container"/>
|
430
|
-
<text variable="collection-title"/>
|
431
|
-
</group>
|
432
|
-
</group>
|
435
|
+
<text macro="container"/>
|
433
436
|
</group>
|
434
437
|
<text macro="locators"/>
|
435
438
|
<group delimiter=", " prefix=". ">
|
data/vendor/schema/csl-terms.rng
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
|
2
|
+
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
3
|
<div>
|
4
4
|
<a:documentation>Terms</a:documentation>
|
5
5
|
<define name="terms">
|
6
6
|
<choice>
|
7
|
-
<ref name="category.field"/>
|
8
7
|
<ref name="terms.gender-assignable"/>
|
9
8
|
<ref name="terms.gender-variants"/>
|
10
9
|
<ref name="terms.locator"/>
|
@@ -39,6 +38,7 @@
|
|
39
38
|
<value>reference</value>
|
40
39
|
<value>retrieved</value>
|
41
40
|
<value>scale</value>
|
41
|
+
<value>version</value>
|
42
42
|
<value>open-quote</value>
|
43
43
|
<a:documentation>Punctuation</a:documentation>
|
44
44
|
<value>close-quote</value>
|
@@ -50,6 +50,9 @@
|
|
50
50
|
<value>season-02</value>
|
51
51
|
<value>season-03</value>
|
52
52
|
<value>season-04</value>
|
53
|
+
<ref name="category.field">
|
54
|
+
<a:documentation>(legacy; remove in CSL 1.1)</a:documentation>
|
55
|
+
</ref>
|
53
56
|
</choice>
|
54
57
|
</define>
|
55
58
|
<define name="terms.gender-assignable">
|
@@ -75,11 +78,18 @@
|
|
75
78
|
<define name="terms.gender-variants">
|
76
79
|
<a:documentation>Terms for which gender variants may be specified</a:documentation>
|
77
80
|
<choice>
|
78
|
-
<
|
81
|
+
<ref name="terms.ordinals"/>
|
82
|
+
<ref name="terms.long-ordinals"/>
|
83
|
+
</choice>
|
84
|
+
</define>
|
85
|
+
<define name="terms.ordinals">
|
86
|
+
<data type="string">
|
79
87
|
<a:documentation>Ordinals</a:documentation>
|
80
|
-
<
|
81
|
-
|
82
|
-
|
88
|
+
<param name="pattern">ordinal(-\d{2})?</param>
|
89
|
+
</data>
|
90
|
+
</define>
|
91
|
+
<define name="terms.long-ordinals">
|
92
|
+
<choice>
|
83
93
|
<value>long-ordinal-01</value>
|
84
94
|
<a:documentation>Long ordinals</a:documentation>
|
85
95
|
<value>long-ordinal-02</value>
|
data/vendor/schema/csl.rng
CHANGED
@@ -434,6 +434,12 @@ cs:style-options element. If future versions of CSL include localized
|
|
434
434
|
options that are citation or bibliography specific, the elements
|
435
435
|
cs:citation-options and cs:bibliography-options can be added.</a:documentation>
|
436
436
|
<element name="cs:style-options">
|
437
|
+
<optional>
|
438
|
+
<attribute name="limit-day-ordinals-to-day-1" a:defaultValue="false">
|
439
|
+
<a:documentation>Limit the "ordinal" form to the first day of the month.</a:documentation>
|
440
|
+
<data type="boolean"/>
|
441
|
+
</attribute>
|
442
|
+
</optional>
|
437
443
|
<optional>
|
438
444
|
<attribute name="punctuation-in-quote" a:defaultValue="false">
|
439
445
|
<a:documentation>Specify whether punctuation (a period or comma) is placed within
|
@@ -512,7 +518,34 @@ or outside (default) the closing quotation mark.</a:documentation>
|
|
512
518
|
</group>
|
513
519
|
<group>
|
514
520
|
<attribute name="name">
|
515
|
-
<ref name="terms.
|
521
|
+
<ref name="terms.ordinals"/>
|
522
|
+
</attribute>
|
523
|
+
<optional>
|
524
|
+
<attribute name="form">
|
525
|
+
<value>long</value>
|
526
|
+
</attribute>
|
527
|
+
</optional>
|
528
|
+
<optional>
|
529
|
+
<attribute name="gender-form">
|
530
|
+
<choice>
|
531
|
+
<value>masculine</value>
|
532
|
+
<value>feminine</value>
|
533
|
+
</choice>
|
534
|
+
</attribute>
|
535
|
+
</optional>
|
536
|
+
<optional>
|
537
|
+
<attribute name="match">
|
538
|
+
<choice>
|
539
|
+
<value>last-digit</value>
|
540
|
+
<value>last-two-digits</value>
|
541
|
+
<value>whole-number</value>
|
542
|
+
</choice>
|
543
|
+
</attribute>
|
544
|
+
</optional>
|
545
|
+
</group>
|
546
|
+
<group>
|
547
|
+
<attribute name="name">
|
548
|
+
<ref name="terms.long-ordinals"/>
|
516
549
|
</attribute>
|
517
550
|
<optional>
|
518
551
|
<attribute name="form">
|
@@ -851,10 +884,14 @@ result of "name-as-sort-order" (e.g., ", " in "Doe, John").</a:documentation>
|
|
851
884
|
</choice>
|
852
885
|
</attribute>
|
853
886
|
</optional>
|
854
|
-
<ref name="affixes"/>
|
855
887
|
<ref name="font-formatting"/>
|
888
|
+
<ref name="names.et-al.legacy-attributes"/>
|
856
889
|
</element>
|
857
890
|
</define>
|
891
|
+
<define name="names.et-al.legacy-attributes">
|
892
|
+
<a:documentation>Ignored in CSL 1.0.1. Will be disallowed with CSL 1.1.</a:documentation>
|
893
|
+
<ref name="affixes"/>
|
894
|
+
</define>
|
858
895
|
<define name="names.label">
|
859
896
|
<a:documentation>Inherits variable from the parent cs:names element.</a:documentation>
|
860
897
|
<element name="cs:label">
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: csl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.pre9
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: namae
|
16
|
-
requirement: &
|
16
|
+
requirement: &70262147603820 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0.3'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70262147603820
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: cucumber
|
27
|
-
requirement: &
|
27
|
+
requirement: &70262147603180 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '1.1'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70262147603180
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70262147602340 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '2.7'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70262147602340
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rake
|
49
|
-
requirement: &
|
49
|
+
requirement: &70262147600760 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0.9'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70262147600760
|
58
58
|
description: ! "\n\t\tA Ruby parser and library for the Citation Style Language (CSL),
|
59
59
|
an open\n\t\tXML-based language to describe the formatting of citations and\n\t\tbibliographies.\n\t\t"
|
60
60
|
email:
|
@@ -164,7 +164,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
164
164
|
version: '0'
|
165
165
|
segments:
|
166
166
|
- 0
|
167
|
-
hash: -
|
167
|
+
hash: -2858139211460160453
|
168
168
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
169
|
none: false
|
170
170
|
requirements:
|