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