Skip to content

Commit 910c52b

Browse files
authored
Rename variables (#318)
Rename creator to series-creator Rename writer to script-writer Added event-title and deprecated event
1 parent 357e7df commit 910c52b

File tree

5 files changed

+149
-135
lines changed

5 files changed

+149
-135
lines changed

schemas/input/csl-data.json

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"entry",
2525
"entry-dictionary",
2626
"entry-encyclopedia",
27+
"event",
2728
"figure",
2829
"graphic",
2930
"hearing",
@@ -118,12 +119,6 @@
118119
"$ref": "#/definitions/name-variable"
119120
}
120121
},
121-
"creator": {
122-
"type": "array",
123-
"items": {
124-
"$ref": "#/definitions/name-variable"
125-
}
126-
},
127122
"curator": {
128123
"type": "array",
129124
"items": {
@@ -220,13 +215,19 @@
220215
"$ref": "#/definitions/name-variable"
221216
}
222217
},
223-
"translator": {
218+
"script-writer": {
219+
"type": "array",
220+
"items": {
221+
"$ref": "#/definitions/name-variable"
222+
}
223+
},
224+
"series-creator": {
224225
"type": "array",
225226
"items": {
226227
"$ref": "#/definitions/name-variable"
227228
}
228229
},
229-
"writer": {
230+
"translator": {
230231
"type": "array",
231232
"items": {
232233
"$ref": "#/definitions/name-variable"
@@ -308,6 +309,10 @@
308309
"type": ["string", "number"]
309310
},
310311
"event": {
312+
"description": "[Deprecated - use 'event-title' instead. Will be removed in 1.1]",
313+
"type": "string"
314+
},
315+
"event-title": {
311316
"type": "string"
312317
},
313318
"event-place": {
@@ -445,7 +450,7 @@
445450
"custom": {
446451
"title": "Custom key-value pairs.",
447452
"type": "object",
448-
"description": "Used to store additional information that does not have a designated CSL JSON field. The note field can also store additional information, but custom is preferred for storing key-value pairs.",
453+
"description": "Used to store additional information that does not have a designated CSL JSON field. The custom field is preferred over the note field for storing custom data, particularly for storing key-value pairs, as the note field is used for user annotations in annotated bibliography styles.",
449454
"examples": [
450455
{
451456
"short_id": "xyz",

schemas/styles/csl-data.rnc

Lines changed: 82 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1+
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
12
namespace dc = "http://purl.org/dc/elements/1.1/"
23

34
dc:title [ "Citation Style Language Data" ]
45
dc:creator [ "Bruce D'Arcus" ]
5-
dc:rights [ "Copyright 2009-2018 Citation Style Language and contributors" ]
6+
dc:rights [
7+
"Copyright 2009-2018 Citation Style Language and contributors"
8+
]
69
dc:license [ "MIT license" ]
710
dc:description [ "A schema for the CSL data model." ]
811
include "csl-types.rnc"
912
include "csl-variables.rnc"
1013
start = element references { reference+ }
11-
reference = element reference { type, id, uri?, container-uri?, (contributor* & date* & variable+) }
14+
reference =
15+
element reference {
16+
type, id, uri?, container-uri?, (contributor* & date* & variable+)
17+
}
1218

1319
## Types
1420
div {
@@ -17,88 +23,93 @@ div {
1723

1824
## Identifiers
1925
div {
20-
21-
## The id is an identifier unique to the scope of the file
22-
id = attribute id { token }
23-
24-
## The URI is the global identity for the refererence; used to associate a citation reference to its data
25-
uri = attribute uri { xsd:anyURI }
2626

27-
## the URI for containing items (such as edited books or journals)
28-
container-uri = attribute container-uri { xsd:anyURI }
27+
## The id is an identifier unique to the scope of the file
28+
id = attribute id { token }
29+
30+
## The URI is the global identity for the refererence; used to associate a citation reference to its data
31+
uri = attribute uri { xsd:anyURI }
32+
33+
## the URI for containing items (such as edited books or journals)
34+
container-uri = attribute container-uri { xsd:anyURI }
2935
}
3036

3137
## Contributors
3238
div {
33-
contributor =
34-
element contributor {
35-
attribute type { variables.names },
36-
name-elements
37-
}
38-
name-elements =
39-
element name { text }
40-
| ((element given { text }? &
41-
element family { text }?) &
42-
element dropping-particle { text }? &
43-
element non-dropping-particle { text }? &
44-
element suffix { text }?)
39+
contributor =
40+
element contributor {
41+
attribute type { variables.names },
42+
name-elements
43+
}
44+
name-elements =
45+
element name { text }
46+
| ((element given { text }?
47+
& element family { text }?)
48+
& element dropping-particle { text }?
49+
& element non-dropping-particle { text }?
50+
& element suffix { text }?)
4551
}
4652

4753
## Dates
4854
div {
49-
date =
50-
element date {
51-
attribute type { variables.dates },
52-
attribute circa { xsd:boolean }?,
53-
(date-pattern | date-range)
54-
}
55-
date-pattern =
56-
year-pattern,
57-
( ( month-pattern, day-pattern? ) | season-pattern )?
58-
date-range =
59-
element begin-date { date-pattern },
60-
element end-date { date-pattern }?
61-
year-pattern =
62-
attribute year {
63-
xsd:integer { maxInclusive="-1" }
64-
| xsd:integer { minInclusive="1" }
65-
}
66-
month-pattern =
67-
attribute month { xsd:integer { minInclusive="1" maxInclusive="12" } }
68-
day-pattern =
69-
attribute day { xsd:integer { minInclusive="1" maxInclusive="31" } }
70-
71-
# 1 = Spring, 2 = Summer, 3 = Fall, 4 = Winter
72-
season-pattern =
73-
attribute season { xsd:integer { minInclusive="1" maxInclusive="4" } }
55+
date =
56+
element date {
57+
attribute type { variables.dates },
58+
attribute circa { xsd:boolean }?,
59+
(date-pattern | date-range)
60+
}
61+
date-pattern =
62+
year-pattern,
63+
((month-pattern, day-pattern?) | season-pattern)?
64+
date-range =
65+
element begin-date { date-pattern },
66+
element end-date { date-pattern }?
67+
year-pattern =
68+
attribute year {
69+
xsd:integer { maxInclusive = "-1" }
70+
| xsd:integer { minInclusive = "1" }
71+
}
72+
month-pattern =
73+
attribute month {
74+
xsd:integer { minInclusive = "1" maxInclusive = "12" }
75+
}
76+
day-pattern =
77+
attribute day {
78+
xsd:integer { minInclusive = "1" maxInclusive = "31" }
79+
}
80+
# 1 = Spring, 2 = Summer, 3 = Fall, 4 = Winter
81+
season-pattern =
82+
attribute season {
83+
xsd:integer { minInclusive = "1" maxInclusive = "4" }
84+
}
7485
}
7586

7687
## Simple Variables
7788
div {
78-
variable =
79-
element variable {
80-
attribute type { variables.standard },
81-
(simple-variable-pattern | rich-variable-pattern)
82-
}
83-
simple-variable-pattern = text
84-
rich-variable-pattern =
85-
(text
86-
| element abbr { text }
87-
| element b { text }
88-
| element cite {
89-
90-
## cited title which is a part (like an article), and so typically rendered in quotes, rather than italicized
91-
attribute class { "part" }?,
92-
text
89+
variable =
90+
element variable {
91+
attribute type { variables.standard },
92+
(simple-variable-pattern | rich-variable-pattern)
93+
}
94+
simple-variable-pattern = text
95+
rich-variable-pattern =
96+
(text
97+
| element abbr { text }
98+
| element b { text }
99+
| element cite {
100+
101+
## cited title which is a part (like an article), and so typically rendered in quotes, rather than italicized
102+
attribute class { "part" }?,
103+
text
93104
}
94-
| element i { text }
95-
| element sc { text }
96-
| element span {
97-
98-
## text whose case should not be transformed (as with proper nouns)
99-
attribute class { "protect" }?,
100-
text
105+
| element i { text }
106+
| element sc { text }
107+
| element span {
108+
109+
## text whose case should not be transformed (as with proper nouns)
110+
attribute class { "protect" }?,
111+
text
101112
}
102-
| element sup { text }
103-
| element sub { text })+
113+
| element sup { text }
114+
| element sub { text })+
104115
}

schemas/styles/csl-relaxed.rnc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ dc:title [ "Citation Style Language Schema - Relaxed" ]
55
dc:creator [ "Bruce D'Arcus" ]
66
dc:rights [ "Permission to freely use, copy and distribute." ]
77
dc:description [
8-
"Relaxes the need for a cs:updated value in the official CSL schema."
8+
"Relaxes the need for a cs:updated value in the official CSL schema."
99
]
10-
11-
include "csl.rnc"{
12-
info-updated = element cs:updated { xsd:dateTime? }
13-
}
10+
include "csl.rnc" {
11+
info-updated = element cs:updated { xsd:dateTime? }
12+
}

schemas/styles/csl-repository.rnc

Lines changed: 41 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,25 @@ namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
22
namespace cs = "http://purl.org/net/xbiblio/csl"
33
namespace dc = "http://purl.org/dc/elements/1.1/"
44

5-
dc:title [ "Extension schema for the Citation Style Language styles repository" ]
5+
dc:title [
6+
"Extension schema for the Citation Style Language styles repository"
7+
]
68
dc:creator [ "Rintze M. Zelle" ]
7-
dc:rights [ "Copyright 2013-2018 Citation Style Language and contributors" ]
9+
dc:rights [
10+
"Copyright 2013-2018 Citation Style Language and contributors"
11+
]
812
dc:license [ "MIT license" ]
913
dc:description [
1014
"Enforces stricter requirements for the styles in the official CSL styles repository."
1115
]
12-
1316
include "csl.rnc" {
14-
17+
1518
## Remove legacy attributes from cs:style of dependents
1619
dependent-style.style =
1720
element cs:style {
18-
style.default-locale,
19-
version,
20-
dependent-style.style.info
21+
style.default-locale, version, dependent-style.style.info
2122
}
22-
23+
2324
## - Only allow cs:issn once
2425
## - Require a cs:rights element
2526
## - Forgo "interleave" (so the elements need to be in the order specified),
@@ -50,7 +51,7 @@ include "csl.rnc" {
5051
info.updated,
5152
info.rights
5253
}
53-
54+
5455
## - Only allow cs:issn once
5556
## - Require a cs:rights element
5657
## - Forgo "interleave" (so the elements need to be in the order specified),
@@ -81,16 +82,18 @@ include "csl.rnc" {
8182
info.updated,
8283
info.rights
8384
}
84-
85+
8586
## Require "license" attribute; require specific value for "license" attribute and
8687
## text content for cs:rights
8788
info.rights =
8889
element cs:rights {
89-
attribute license { "http://creativecommons.org/licenses/by-sa/3.0/" },
90+
attribute license {
91+
"http://creativecommons.org/licenses/by-sa/3.0/"
92+
},
9093
attribute xml:lang { xsd:language }?,
9194
"This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License"
9295
}
93-
96+
9497
## Remove legacy attributes from cs:et-al
9598
names.et-al =
9699

@@ -103,41 +106,35 @@ include "csl.rnc" {
103106
font-formatting
104107
}
105108
}
106-
107109
independent-style.info.link.self =
108-
element cs:link {
109-
attribute href { xsd:anyURI },
110-
attribute rel { "self" },
111-
info-text
112-
}
113-
110+
element cs:link {
111+
attribute href { xsd:anyURI },
112+
attribute rel { "self" },
113+
info-text
114+
}
114115
independent-style.info.link.template =
115-
element cs:link {
116-
attribute href { xsd:anyURI },
117-
attribute rel { "template" },
118-
info-text
119-
}
120-
116+
element cs:link {
117+
attribute href { xsd:anyURI },
118+
attribute rel { "template" },
119+
info-text
120+
}
121121
independent-style.info.link.independent-parent =
122-
element cs:link {
123-
attribute href { xsd:anyURI },
124-
attribute rel { "independent-parent" },
125-
info-text
126-
}
127-
122+
element cs:link {
123+
attribute href { xsd:anyURI },
124+
attribute rel { "independent-parent" },
125+
info-text
126+
}
128127
independent-style.info.link.documentation =
129-
element cs:link {
130-
attribute href { xsd:anyURI },
131-
attribute rel { "documentation" },
132-
info-text
133-
}
134-
128+
element cs:link {
129+
attribute href { xsd:anyURI },
130+
attribute rel { "documentation" },
131+
info-text
132+
}
135133
info.category.citation-format =
136-
element cs:category {
137-
attribute citation-format { category.citation-format }
138-
}
139-
134+
element cs:category {
135+
attribute citation-format { category.citation-format }
136+
}
140137
info.category.field =
141-
element cs:category {
142-
attribute field { category.field }
143-
}
138+
element cs:category {
139+
attribute field { category.field }
140+
}

0 commit comments

Comments
 (0)