-
-
Notifications
You must be signed in to change notification settings - Fork 60
/
csl.rnc
1017 lines (887 loc) · 32.4 KB
/
csl.rnc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
namespace bibo = "http://purl.org/ontology/bibo/"
namespace cs = "http://purl.org/net/xbiblio/csl"
namespace dc = "http://purl.org/dc/elements/1.1/"
namespace sch = "http://purl.oclc.org/dsdl/schematron"
namespace xhtml = "http://www.w3.org/1999/xhtml"
# CSL schema metadata
dc:title [ "Citation Style Language" ]
dc:creator [ "Bruce D'Arcus" ]
dc:creator [ "Simon Kornblith" ]
bibo:editor [ "Frank Bennett" ]
bibo:editor [ "Rintze Zelle" ]
dc:rights [
"Copyright 2007-2020 Citation Style Language and contributors"
]
dc:license [ "MIT license" ]
dc:description [
"RELAX NG compact schema for the Citation Style Language (CSL)."
]
## Subparts of the CSL schema
include "csl-choose.rnc"
include "csl-terms.rnc"
include "csl-types.rnc"
include "csl-variables.rnc"
include "csl-categories.rnc"
# ==============================================================================
## cs:style and cs:locale - Root Elements
div {
start =
independent-style.style | dependent-style.style | locale-file.locale
independent-style.style =
element cs:style {
## Select whether citations appear in-text or as notes.
attribute class { "in-text" | "note" },
style.default-locale,
style.options,
version,
independent-style.style.info,
(style.locale*
& style.macro*
& style.citation
& style.bibliography?)
}
dependent-style.style =
element cs:style {
style.default-locale, version, dependent-style.style.info
}
style.default-locale =
## Set a default style locale.
attribute default-locale { xsd:language }?
version =
## Indicate CSL version compatibility.
[ a:defaultValue = "1.0" ] attribute version { "1.0" }
}
# ==============================================================================
## cs:info - Style and Locale File Metadata
div {
## Metadata for independent styles.
independent-style.style.info =
element cs:info {
info.author*
& info.category*
& info.contributor*
& info.id
& info.issn*
& info.eissn?
& info.issnl?
& independent-style.info.link*
& info.published?
& info.rights?
& info.summary?
& info.title
& info.title-short?
& info.updated
}
## Metadata for dependent styles.
dependent-style.style.info =
element cs:info {
info.author*
& info.category*
& info.contributor*
& info.id
& info.issn*
& info.eissn?
& info.issnl?
& dependent-style.info.link+
& info.published?
& info.rights?
& info.summary?
& info.title
& info.title-short?
& info.updated
}
## Metadata for locale files.
locale-file.locale.info =
element cs:info { info.translator* & info.rights? & info.updated? }
info.author = element cs:author { personal-details }
info.contributor = element cs:contributor { personal-details }
info.translator = element cs:translator { personal-details }
personal-details =
element cs:name { text }
& element cs:email { text }?
& element cs:uri { xsd:anyURI }?
info.category =
## Specify the citation format of the style (using the "citation-format"
## attribute) or the fields and disciplines for which the style is
## relevant (using the "field" attribute).
element cs:category {
attribute citation-format { category.citation-format }
| attribute field { category.field }
}
info.id =
## Specify the unique and stable identifier for the style. A URI
## is valid, but new styles should use a UUID to ensure stability
## and uniqueness.
element cs:id { xsd:anyURI }
info.issn =
## Specify the journal's ISSN(s) for journal-specific styles. An ISSN
## must consist of four digits, a hyphen, three digits, and a check
## digit (a numeral digit or roman X), e.g. "1234-1231".
element cs:issn { issn }
info.eissn =
## Specify the journal's eISSN for journal-specific styles.
element cs:eissn { issn }
info.issnl =
## Specify the journal's ISSN-L for journal-specific styles.
element cs:issnl { issn }
issn = xsd:string { pattern = "\d{4}\-\d{3}(\d|x|X)" }
independent-style.info.link =
element cs:link {
attribute href { xsd:anyURI },
## Specify how the URL relates to the style.
attribute rel {
## The URI of the CSL style itself.
"self"
|
## URI of the style from which the current style is derived.
"template"
|
## URI of style documentation.
"documentation"
},
info-text
}
dependent-style.info.link =
element cs:link {
attribute href { xsd:anyURI },
## Specify how the URL relates to the style.
attribute rel {
## The URI of the CSL style itself.
"self"
|
## URI of the CSL style whose content should be used for
## processing. Required for dependent styles.
"independent-parent"
|
## URI of style documentation.
"documentation"
},
info-text
}
info.published =
## Specify when the style was initially created or made available.
element cs:published { xsd:dateTime }
info.rights =
element cs:rights {
attribute license { xsd:anyURI }?,
info-text
}
info.summary = element cs:summary { info-text }
info.title = element cs:title { info-text }
info.title-short =
## Specify an abbreviated style title (e.g., "APA")
element cs:title-short { info-text }
info.updated =
## Specify when the style was last updated (e.g.,
## "2007-10-26T21:32:52+02:00")
element cs:updated { xsd:dateTime }
info-text =
attribute xml:lang { xsd:language }?,
text
}
# ==============================================================================
## cs:locale in Independent Styles
div {
style.locale =
## Use to (re)define localized terms, dates and options.
element cs:locale {
## Specify the affected locale(s). If "xml:lang" is not set, the
## "cs:locale" element affects all locales.
attribute xml:lang { xsd:language }?,
(locale.style-options? & locale.date* & locale.terms?)
}
}
# ==============================================================================
## cs:locale Contents - Localization Data
div {
## Localized global options are specified as attributes in the
## cs:style-options element. If future versions of CSL include localized
## options that are citation or bibliography specific, the elements
## cs:citation-options and cs:bibliography-options can be added.
locale.style-options =
element cs:style-options {
## Limit the "ordinal" form to the first day of the month.
[ a:defaultValue = "false" ]
attribute limit-day-ordinals-to-day-1 { xsd:boolean }?,
## Specify whether punctuation (a period or comma) is placed within
## or outside (default) the closing quotation mark.
[ a:defaultValue = "false" ]
attribute punctuation-in-quote { xsd:boolean }?
}
locale-file.locale =
element cs:locale {
## Specify the locale of the locale file.
attribute xml:lang { xsd:language },
version,
locale-file.locale.info?,
(locale.style-options & locale.date+ & locale.terms)
}
locale.date =
element cs:date {
date.form,
delimiter,
font-formatting,
text-case,
locale.date.date-part+
}
date.form =
## Select the localized date format ("text" or "numeric").
attribute form {
## Text date form (e.g., "December 15, 2005").
"text"
|
## Numeric date form (e.g., "2005-12-15").
"numeric"
}
locale.date.date-part =
element cs:date-part {
affixes, font-formatting, text-case, (day | month | year)
}
locale.terms = element cs:terms { terms.term+ }
## The "cs:term" element can either hold a basic string, or "cs:single" and
## "cs:multiple" child elements to give singular and plural forms of the term.
terms.term =
element cs:term {
term.attributes,
(text | (term.single, term.multiple))
}
term.attributes =
(attribute name { terms },
[ a:defaultValue = "long" ] attribute form { term.form }?)
| (attribute name { terms.ordinals },
attribute form { "long" }?,
attribute gender-form { "masculine" | "feminine" }?,
attribute match {
"last-digit" | "last-two-digits" | "whole-number"
}?)
| (attribute name { terms.long-ordinals },
attribute form { "long" }?,
attribute gender-form { "masculine" | "feminine" })
| (attribute name { terms.gender-assignable },
attribute form { "long" }?,
attribute gender { "masculine" | "feminine" })
## "verb-short" reverts to "verb" if the "verb-short" form is not available.
## "symbol" reverts to "short" if the "symbol" form is not available.
## "verb" and "short" revert to "long" if the specified form is not available.
term.form = "long" | "verb" | "short" | "verb-short" | "symbol"
term.single =
## Singular version of the term.
element cs:single { text }
term.multiple =
## Plural version of the term.
element cs:multiple { text }
}
# ==============================================================================
## cs:macro
div {
style.macro =
## Use to create collections of (reusable) formatting instructions.
element cs:macro {
attribute name { xsd:NMTOKEN },
rendering-element+
}
}
# ==============================================================================
## Rendering Elements
div {
rendering-element =
rendering-element.names
| rendering-element.date
| rendering-element.label
| rendering-element.text
| rendering-element.number
| rendering-element.choose
| rendering-element.group
}
# ==============================================================================
## cs:citation and cs:bibliography
div {
style.citation =
## Use to describe the formatting of citations.
element cs:citation { citation.options, sort?, citation.layout }
style.bibliography =
## Use to describe the formatting of the bibliography.
element cs:bibliography {
bibliography.options, sort?, bibliography.layout
}
citation.layout =
element cs:layout {
affixes, delimiter, font-formatting, rendering-element+
}
bibliography.layout =
element cs:layout { affixes, font-formatting, rendering-element+ }
}
# ==============================================================================
## cs:names Rendering Element
div {
rendering-element.names =
element cs:names {
names.attributes,
((names.name?, names.et-al?) & names.label?),
names.substitute?
}
names.attributes =
attribute variable {
list { variables.names+ }
},
affixes,
## Specify the delimiter for name lists of name variables rendered by
## the same cs:names element.
delimiter,
display,
font-formatting
names.name =
element cs:name {
name.attributes,
## Select the "long" (first name + last name, for Western names),
## "short" (last name only, for Western names), or "count" name form
## (returning the number of names in the name variable, which can be
## useful for some sorting algorithms).
[ a:defaultValue = "long" ]
attribute form { "long" | "short" | "count" }?,
affixes,
## Set the delimiter for names in a name variable (e.g., ", " in
## "Doe, Smith")
[ a:defaultValue = ", " ] delimiter,
font-formatting,
name.name-part*
}
name.attributes =
## Use to separate the second-to-last and last name of a name list by
## the "and" term or ampersand.
attribute and {
## Use the "and" term (e.g., "Doe, Johnson and Smith").
"text"
|
## Use the "ampersand" (e.g., "Doe, Johnson & Smith").
"symbol"
}?,
## Specify when the name delimiter is used between a truncated name list
## and the "et-al" (or "and others") term in case of et-al abbreviation
## (e.g., "Smith, Doe et al." or "Smith, Doe, et al.").
[ a:defaultValue = "contextual" ]
attribute delimiter-precedes-et-al {
## The name delimiter is only used when the truncated name list
## consists of two or more names.
"contextual"
|
## The name delimiter is always used.
"always"
|
## The name delimiter is never used.
"never"
|
## The name delimiter is only used if the preceding name is inverted as
## a result of the "name-as-sort-order" attribute.
"after-inverted-name"
}?,
## Specify when the name delimiter is used between the second-to-last
## and last name of a non-truncated name list. Only has an effect when
## the "and" term or ampersand is used (e.g., "Doe and Smith" or "Doe,
## and Smith").
[ a:defaultValue = "contextual" ]
attribute delimiter-precedes-last {
## The name delimiter is only used when the name list consists of
## three or more names.
"contextual"
|
## The name delimiter is always used.
"always"
|
## The name delimiter is never used.
"never"
|
## The name delimiter is only used if the preceding name is inverted as
## a result of the "name-as-sort-order" attribute.
"after-inverted-name"
}?,
## Set the minimum number of names needed in a name variable to activate
## et-al abbreviation.
attribute et-al-min { xsd:integer }?,
## Set the number of names to render when et-al abbreviation is active.
attribute et-al-use-first { xsd:integer }?,
## As "et-al-min", but only affecting subsequent citations to an item.
attribute et-al-subsequent-min { xsd:integer }?,
## As "et-al-use-first", but only affecting subsequent citations to an
## item.
attribute et-al-subsequent-use-first { xsd:integer }?,
## If set to "true", the "et-al" (or "and others") term is replaced by
## an ellipsis followed by the last name of the name variable.
[ a:defaultValue = "false" ]
attribute et-al-use-last { xsd:boolean }?,
## If set to "false", names are not initialized and "initialize-with"
## only affects initials already present in the input data.
[ a:defaultValue = "true" ] attribute initialize { xsd:boolean }?,
## Activate initializing of given names. The attribute value is appended
## to each initial (e.g., with ". ", "Orson Welles" becomes "O. Welles").
attribute initialize-with { text }?,
## Specify whether (and which) names should be rendered in their sort
## order (e.g., "Doe, John" instead of "John Doe").
attribute name-as-sort-order {
## Render the first name of each name variable in sort order.
"first"
|
## Render all names in sort order.
"all"
}?,
## Sets the delimiter for name-parts that have switched positions as a
## result of "name-as-sort-order" (e.g., ", " in "Doe, John").
[ a:defaultValue = ", " ] attribute sort-separator { text }?
name.name-part =
## Use to format individual name parts (e.g., "Jane DOE").
element cs:name-part {
attribute name { "family" | "given" },
affixes,
font-formatting,
text-case
}
names.et-al =
## Specify the term used for et-al abbreviation and its formatting.
element cs:et-al {
## Select the term to use for et-al abbreviation.
[ a:defaultValue = "et-al" ]
attribute term { "et-al" | "and others" }?,
font-formatting
}
## Inherits variable from the parent cs:names element.
names.label =
element cs:label {
[ a:defaultValue = "long" ] attribute form { term.form }?,
label.attributes-shared
}
names.substitute =
## Specify substitution options when the name variables selected on the
## parent cs:names element are empty.
element cs:substitute { (substitute.names | rendering-element)+ }
## Short version of cs:names, without children, allowed in cs:substitute.
substitute.names = element cs:names { names.attributes }
}
# ==============================================================================
## cs:date Rendering Element
div {
rendering-element.date =
element cs:date {
attribute variable { variables.dates },
((
## Limit the date parts rendered.
[ a:defaultValue = "year-month-day" ]
attribute date-parts {
## Year, month and day
"year-month-day"
|
## Year and month
"year-month"
|
## Year only
"year"
}?,
date.form,
rendering-element.date.date-part.localized*)
| (rendering-element.date.date-part.non-localized+, delimiter)),
affixes,
display,
font-formatting,
text-case
}
rendering-element.date.date-part.localized =
## Specify overriding formatting for localized dates (affixes
## cannot be overridden, as these are considered locale-specific).
## Example uses are forcing the use of leading-zeros, or of the
## "short" month form. Has no effect on which, and in what order,
## date parts are rendered.
element cs:date-part {
font-formatting, text-case, (day | month | year)
}
rendering-element.date.date-part.non-localized =
## Specify, in the desired order, the date parts that should be
## rendered and their formatting.
element cs:date-part {
affixes, font-formatting, text-case, (day | month | year)
}
day =
attribute name { "day" },
## Day forms: "numeric" ("5"), "numeric-leading-zeros" ("05"), "ordinal"
## ("5th").
[ a:defaultValue = "numeric" ]
attribute form { "numeric" | "numeric-leading-zeros" | "ordinal" }?,
range-delimiter
month =
attribute name { "month" },
## Months forms: "long" (e.g., "January"), "short" ("Jan."), "numeric"
## ("1"), and "numeric-leading-zeros" ("01").
[ a:defaultValue = "long" ]
attribute form {
"long" | "short" | "numeric" | "numeric-leading-zeros"
}?,
range-delimiter,
strip-periods
year =
attribute name { "year" },
## Year forms: "long" ("2005"), "short" ("05").
[ a:defaultValue = "long" ] attribute form { "short" | "long" }?,
range-delimiter
range-delimiter =
## Specify a delimiter for date ranges (by default the en-dash). A custom
## delimiter is retrieved from the largest date part ("day", "month" or
## "year") that differs between the two dates.
[ a:defaultValue = "–" ] attribute range-delimiter { text }?
}
# ==============================================================================
## cs:text Rendering Element
div {
rendering-element.text =
## Use to call macros, render variables, terms, or verbatim text.
element cs:text {
text.attributes,
affixes,
display,
font-formatting,
quotes,
strip-periods,
text-case
}
text.attributes =
## Select a macro.
attribute macro { xsd:NMTOKEN }
| (
## Select a term.
attribute term { terms },
[ a:defaultValue = "long" ] attribute form { term.form }?,
## Specify term plurality: singular ("false") or plural ("true").
[ a:defaultValue = "false" ] attribute plural { xsd:boolean }?)
|
## Specify verbatim text.
attribute value { text }
| (
## Select a variable.
attribute variable { variables.standard },
[ a:defaultValue = "long" ] attribute form { "short" | "long" }?)
}
# ==============================================================================
## cs:number Rendering Element
div {
rendering-element.number =
## Use to render a number variable.
element cs:number {
number.attributes, affixes, display, font-formatting, text-case
}
number.attributes =
attribute variable { variables.numbers },
## Number forms: "numeric" ("4"), "ordinal" ("4th"), "long-ordinal"
## ("fourth"), "roman" ("iv").
[ a:defaultValue = "numeric" ]
attribute form { "numeric" | "ordinal" | "long-ordinal" | "roman" }?
}
# ==============================================================================
## cs:label Rendering Element
div {
rendering-element.label =
## Use to render a term whose pluralization depends on the content of a
## variable. E.g., if "page" variable holds a range, the plural label
## "pp." is selected instead of the singular "p.".
element cs:label { label.attributes, label.attributes-shared }
label.attributes =
attribute variable { variables.numbers | "locator" | "page" },
[ a:defaultValue = "long" ]
attribute form { "long" | "short" | "symbol" }?
label.attributes-shared =
## Specify when the plural version of a term is selected.
[ a:defaultValue = "contextual" ]
attribute plural { "always" | "never" | "contextual" }?,
affixes,
font-formatting,
strip-periods,
text-case
}
# ==============================================================================
## cs:group Rendering Element
div {
rendering-element.group =
## Use to group rendering elements. Groups are useful for setting a
## delimiter for the group children, for organizing the layout of
## bibliographic entries (using the "display" attribute), and for
## suppressing the rendering of terms and verbatim text when variables
## are empty.
element cs:group {
group.attributes,
affixes,
delimiter,
display,
font-formatting,
rendering-element+
}
group.attributes = notAllowed?
}
# ==============================================================================
## Style Options
div {
style.options =
style.demote-non-dropping-particle,
style.initialize-with-hyphen,
style.page-range-format,
names-inheritable-options,
name-inheritable-options
citation.options =
citation.cite-group-delimiter,
citation.collapse-options,
citation.disambiguate-options,
citation.near-note-distance,
names-inheritable-options,
name-inheritable-options
bibliography.options =
bibliography.hanging-indent,
bibliography.line-formatting-options,
bibliography.second-field-align,
bibliography.subsequent-author-substitute-options,
names-inheritable-options,
name-inheritable-options
style.demote-non-dropping-particle =
## Specify whether the non-dropping particle is demoted in inverted
## names (e.g., "Koning, W. de").
[ a:defaultValue = "display-and-sort" ]
attribute demote-non-dropping-particle {
"never" | "sort-only" | "display-and-sort"
}?
style.initialize-with-hyphen =
## Specify whether compound given names (e.g., "Jean-Luc") are
## initialized with ("J-L") or without a hyphen ("JL").
[ a:defaultValue = "true" ]
attribute initialize-with-hyphen { xsd:boolean }?
style.page-range-format =
## Reformat page ranges in the "page" variable.
attribute page-range-format {
"expanded"
| "minimal"
| "minimal-two"
| "chicago"
| "chicago-15"
| "chicago-16"
}?
citation.cite-group-delimiter =
## Activate cite grouping and specify the delimiter for cites within a
## cite group.
[ a:defaultValue = ", " ] attribute cite-group-delimiter { text }?
citation.collapse-options =
## Activate cite grouping and specify the method of citation collapsing.
attribute collapse {
## Collapse ranges of numeric cites, e.g. from "[1,2,3]" to "[1-3]".
"citation-number"
|
## Collapse cites by suppressing repeated names, e.g. from "(Doe
## 2000, Doe 2001)" to "(Doe 2000, 2001)".
"year"
|
## Collapse cites as with "year", but also suppresses repeated
## years, e.g. from "(Doe 2000a, Doe 2000b)" to "(Doe 2000a, b)".
"year-suffix"
|
## Collapses cites as with "year-suffix", but also collapses
## ranges of year-suffixes, e.g. from "(Doe 2000a, Doe 2000b,
## Doe 2000c)" to "(Doe 2000a-c)".
"year-suffix-ranged"
}?,
## Specify the delimiter between year-suffixes. Defaults to the cite
## delimiter.
attribute year-suffix-delimiter { text }?,
## Specify the delimiter following a group of collapsed cites. Defaults
## to the cite delimiter.
attribute after-collapse-delimiter { text }?
citation.disambiguate-options =
## Set to "true" to activate disambiguation by showing names that were
## originally hidden as a result of et-al abbreviation.
[ a:defaultValue = "false" ]
attribute disambiguate-add-names { xsd:boolean }?,
## Set to "true" to activate disambiguation by expanding names, showing
## initials or full given names.
[ a:defaultValue = "false" ]
attribute disambiguate-add-givenname { xsd:boolean }?,
## Set to "true" to activate disambiguation by adding year-suffixes
## (e.g., "(Doe 2007a, Doe 2007b)") for items from the same author(s)
## and year.
[ a:defaultValue = "false" ]
attribute disambiguate-add-year-suffix { xsd:boolean }?,
## Specify how name are expanded for disambiguation.
[ a:defaultValue = "by-cite" ]
attribute givenname-disambiguation-rule {
## Each ambiguous names is progressively transformed until
## disambiguated (when disambiguation is not possible, the name
## remains in its original form).
"all-names"
|
## As "all-names", but name expansion is limited to showing
## initials.
"all-names-with-initials"
|
## As "all-names", but disambiguation is limited to the first name
## of each cite.
"primary-name"
|
## As "all-names-with-initials", but disambiguation is limited to
## the first name of each cite.
"primary-name-with-initials"
|
## As "all-names", but only ambiguous names in ambiguous cites are
## expanded.
"by-cite"
}?
citation.near-note-distance =
## Set the number of preceding notes (footnotes or endnotes) within
## which the current item needs to have been previously cited in order
## for the "near-note" position to be "true".
[ a:defaultValue = "5" ]
attribute near-note-distance { xsd:integer }?
bibliography.hanging-indent =
## Set to "true" to render bibliographic entries with hanging indents.
[ a:defaultValue = "false" ]
attribute hanging-indent { xsd:boolean }?
bibliography.line-formatting-options =
## Set the spacing between bibliographic entries.
[ a:defaultValue = "1" ]
attribute entry-spacing { xsd:nonNegativeInteger }?,
## Set the spacing between bibliographic lines.
[ a:defaultValue = "1" ]
attribute line-spacing {
xsd:integer { minExclusive = "0" }
}?
bibliography.second-field-align =
## Use to align any subsequent lines of bibliographic entries with the
## beginning of the second field.
attribute second-field-align {
## Align the first field with the margin.
"flush"
|
## Put the first field in the margin and align all subsequent
## lines of text with the margin.
"margin"
}?
bibliography.subsequent-author-substitute-options =
## Substitute names that repeat in subsequent bibliographic entries by
## the attribute value.
attribute subsequent-author-substitute { text }?,
## Specify the method of substitution of names repeated in subsequent
## bibliographic entries.
[ a:defaultValue = "complete-all" ]
attribute subsequent-author-substitute-rule {
## Requires a match of all rendered names in the name variable, and
## substitutes once for all names.
"complete-all"
|
## Requires a match of all rendered names in the name variable,
## and substitutes for each name.
"complete-each"
|
## Substitutes for each name, until the first mismatch.
"partial-each"
|
## Substitutes the first name if it matches.
"partial-first"
}?
## Options affecting cs:names, for cs:style, cs:citation and cs:bibliography.
names-inheritable-options =
## Inheritable name option, companion for "delimiter" on cs:names.
attribute names-delimiter { text }?
## Options affecting cs:name, for cs:style, cs:citation and cs:bibliography.
name-inheritable-options =
name.attributes,
## Inheritable name option, companion for "delimiter" on cs:name.
attribute name-delimiter { text }?,
## Inheritable name option, companion for "form" on cs:name.
[ a:defaultValue = "long" ]
attribute name-form { "long" | "short" | "count" }?
}
# ==============================================================================
## cs:sort - Sorting
div {
sort =
## Specify how cites and bibliographic entries should be sorted. By
## default, items appear in the order in which they were cited.
element cs:sort { sort.key+ }
sort.key =
element cs:key {
(attribute variable { variables }
| attribute macro { xsd:NMTOKEN }),
## The minimum number of names needed in a name variable to activate
## name list truncation. Overrides the values set on any
## "et-al-(subsequent-)min" attributes.
attribute names-min { xsd:integer }?,
## The number of names to render when name list truncation is
## activated. Overrides the values set on the
## "et-al-(subsequent-)use-first" attributes.
attribute names-use-first { xsd:integer }?,
## Use to override the value of the "et-at-use-last" attribute.
attribute names-use-last { xsd:boolean }?,
## Select between an ascending and descending sort.
[ a:defaultValue = "ascending" ]
attribute sort { "ascending" | "descending" }?
}
}
# ==============================================================================
## Formatting attributes.
div {
affixes =
[ a:defaultValue = "" ] attribute prefix { text }?,
[ a:defaultValue = "" ] attribute suffix { text }?
delimiter = attribute delimiter { text }?
display =
## By default, bibliographic entries consist of continuous runs of text.
## With the "display" attribute, portions of each entry can be
## individually positioned.
attribute display {
## Places the content in a block stretching from margin to margin.
"block"
|
## Places the content in a block starting at the left margin.
"left-margin"
|
## Places the content in a block to the right of a preceding
## "left-margin" block.
"right-inline"
|
## Places the content in a block indented to the right by a standard
## amount.
"indent"
}?
## The font-formatting attributes are based on those of CSS and XSL-FO.
font-formatting =
[ a:defaultValue = "normal" ]
attribute font-style { "italic" | "normal" | "oblique" }?,
[ a:defaultValue = "normal" ]
attribute font-variant { "normal" | "small-caps" }?,
[ a:defaultValue = "normal" ]
attribute font-weight { "normal" | "bold" | "light" }?,
[ a:defaultValue = "none" ]
attribute text-decoration { "none" | "underline" }?,
[ a:defaultValue = "baseline" ]
attribute vertical-align { "baseline" | "sup" | "sub" }?
quotes =
## When set to "true", quotes are placed around the rendered text.
[ a:defaultValue = "false" ] attribute quotes { xsd:boolean }?
strip-periods =
## When set to "true", periods are removed from the rendered text.
[ a:defaultValue = "false" ]
attribute strip-periods { xsd:boolean }?
text-case =
attribute text-case {
## Renders text in lowercase.
"lowercase"
|
## Renders text in uppercase.
"uppercase"