1 namespace atom = "http://www.w3.org/2005/Atom"
2 namespace cs = "http://purl.org/net/xbiblio/csl"
3 namespace dc = "http://purl.org/dc/elements/1.1/"
4 namespace s = "http://www.ascc.net/xml/schematron"
5 namespace xhtml = "http://www.w3.org/1999/xhtml"
7 dc:title [ "Citation Style Language" ]
8 dc:creator [ "Bruce D'Arcus" ]
9 dc:creator [ "Simon Kornblith" ]
10 dc:copyright [ "Bruce D'Arcus and Simon Kornblith, 2007" ]
11 dc:rights [ "Permission to freely use, copy and distribute." ]
13 "Citation Style Language (CSL) schema for describing bibliographic and citation formatting."
17 ## The CSL data model consists of resources and variables. Primary resources are the
18 ## citation object itself, as well as related agents and events. Variables are
19 ## attributes of the resource: titles, dates, volume numbers, and so forth. From the
20 ## perspective of CSL, resources templates involve a list of variables. By contrast,
21 ## a variable can be accessed directly.
22 ## In addition, CSL also contains structures for macros and parameter options.
26 attribute xml:lang { xsd:language }?,
28 ## Refers to the default locale for the style; should generally
29 ## be set for any academic journal, since it can be used to ensure
30 ## proper quote formatting and such.
31 attribute default-locale { xsd:language }?,
32 attribute class { "in-text" | "note" },
34 (terms? & macro* & citation & bibliography?)?
41 ## The Content model for the metadata is borrowed from Atom.
58 attribute xml:lang { xsd:language }?,
60 info-author = element cs:author { info-Contributor-pattern }
61 info-Contributor-pattern =
62 element cs:name { text }
63 & element cs:email { text }?
64 & element cs:uri { xsd:anyURI }?
67 ## The schema attribute should be understood to specify the controlled
68 ## CSL category list. The terms thus typically include further logic,
69 ## such as the broader categories to which they belong ("humanities",
70 ## "social sciences") as well as the class of style ("author-date", "note", etc.).
73 attribute term { info-fields | info-classes },
74 attribute scheme { xsd:anyURI }?,
75 attribute label { text }?
78 ## Add one or more field categories. The "generic-base" category is reserved
79 ## for the handful of truly generic styles (APA, Harvard, etc.) from which most descend.
103 | "political_science"
107 | info-categories.extension
108 info-classes = "author-date" | "numeric" | "label" | "note" | "in-text"
110 ## You can override in a customization schema, though please report
111 ## obvious gaps for inclusion in the schema.
112 info-categories.extension = notAllowed
114 info-contributor = element cs:contributor { info-Contributor-pattern }
115 info-translator = element cs:translator { info-Contributor-pattern }
117 ## As in Atom, the cs:id element is a required URI that is globally-unique
118 ## and persistant. Once assigned it should never change. Ideally, of course,
119 ## the URI resolves to the correct CSL file.
120 info-id = element cs:id { string }
123 attribute href { xsd:anyURI },
125 ## For transformation to Atom, the rel values should be expanded to include the
126 ## base URI <http://purl.org/net/xbiblio/csl/relations#>.
129 ## The CSL file URI whose configuration content should be
130 ## used for processing. To be used where, for example, a
131 ## journal may use a generic publisher style that is shared
132 ## with other journals.
135 ## The CSL file URI on which the style is based. Since most
136 ## styles are based on a handful of core styles, this can be
137 ## useful metadata to see those relationships.
140 ## The homepage URI for the style.
143 ## A documentation URI for a style.
146 # type borrows from Atom schema pattern
150 xsd:string { pattern = ".+/.+" }
152 attribute hreflang { xsd:language }?,
153 attribute title { text }?,
154 attribute length { text }?,
157 info-published = element cs:published { xsd:dateTime }
158 info-rights = element cs:rights { info-text }
159 info-source = element cs:source { info-title & info-link? & info-id }
160 info-summary = element cs:summary { info-text }
161 info-title = element cs:title { info-text }
162 ## the issn for the journal the style corresponds to
163 # might use a regular expression pattern to validate content?
164 info-issn = element cs:issn { text }
165 info-updated = element cs:updated { xsd:dateTime }
172 ## Miscellaneous Terms
233 ## a synonym for "page" (to be deprecated)
243 ## "symbol" and reverts to "short" if no term exists
244 ## "verb-short" reverts to "verb" if no term exists
245 ## all others revert to "long" if no term exists
246 cs-term-forms = "long" | "verb" | "short" | "verb-short" | "symbol" | cs-term-forms.extension
248 ## include-period adds a period after a term if and only if the
249 ## term used (not necessarily term specified; see above) is
250 ## of form "short" or "verb-short"
251 include-period = attribute include-period { xsd:boolean }?
253 ## Extension structures. You may override these in a customization
254 ## schema. If you do, please contact the xbiblio project to add
255 ## the term or form to the formal controlled list in the schema.
257 cs-terms.extension = notAllowed
258 cs-term-forms.extension = notAllowed
265 ## Terms are localized strings used as content for the cs:text field.
266 ## It is only needed where you need to add a term not supported by
267 ## default, or override an existing one.
268 terms = element cs:terms { locale+ }
270 ## A language-specific wrapper.
274 ## Where localization is other than that of the style, use the
275 ## xml:lang attribute.
276 attribute xml:lang { xsd:language }?,
277 (simple-term | compound-term)+
280 attribute form { cs-term-forms }?,
281 attribute name { cs-terms },
284 ## Simple terms are basic strings, used to represent genres, media, etc.
285 simple-term = element cs:term { term-attributes, text }
287 ## Compound terms are those whose output can be either singular or plural.
288 ## Typically used for things like page number or editor labels.
289 compound-term = element cs:term { term-attributes, single-term, multiple-term }
290 multiple-term = element cs:multiple { text }
291 single-term = element cs:single { text }
294 ## Names is a data type holding a text of authors, editors, or translators.
302 names = element cs:names { names-attributes, (name & name-label*), substitute? }
304 ## Short version of "names" element, without children, allowed in <substitute>
305 names-short = element cs:names { names-attributes }
310 ## Indicates long (first name + last name, for Western names) or short
311 ## (last name only, for Western names) form of name. Default is long
313 attribute form { "long" | "short" }?,
315 ## Controls appearance of "and"/"&". To disable, do not specify.
316 attribute and { "text" | "symbol" }?,
318 ## Delimiter between names (delimiter between variables is on <names>
319 ## tag, where it should be). This is ", " in "J. Doe, S. Smith."
322 ## delimiter for the last name is a list
323 attribute delimiter-precedes-last {
325 ## The "always" value means that result is "J. Doe, and T. Timmons"
328 ## Default behavior; would result in "J. Doe and T. Timmons," but "J. Doe,
329 ## S. Smith, and T. Timmons" (note comma preceding 'and').
333 ## Sets the first-author name order to correspond to the sort order of
334 ## the bibliography; e.g. Doe, John (name-as-sort-order) vs. John Doe (w/o
336 attribute name-as-sort-order { "first" | "all" }?,
338 ## The delimiter for personal name parts where sort order differs from
339 ## display order (for example, in standard Western names). This is the
340 ## ", " in "Doe, John."
341 attribute sort-separator { text }?,
343 ## Indicates whether given name parts ought to be given as initials
344 ## (e.g., J. K. Rowling) and the text to follow each initial.
345 attribute initialize-with { text }?
348 ## Similar to label as below, but inherits variable from <names> tag
349 name-label = element cs:label { label-primitives }
351 ## Substitutions, if the name does not exist
352 substitute = element cs:substitute { (names-short | cs-element)+ }
361 | "original-publisher"
364 ## to be used when citing a section of a book, for example, to distinguish the author
365 ## proper from the author of the containing work
368 ## use for series editor
377 list { cs-date-tokens+ }
383 date-part = element cs:date-part { formatting, (month | day | year-other) }
386 ## long (default): January
389 ## numeric-leading-zeros: 01
391 attribute name { "month" },
392 (attribute form { "long" | "short" | "numeric" | "numeric-leading-zeros" }?,
396 ## numeric (default): 5
397 ## numeric-leading-zeros: 05
400 attribute name { "day" },
401 attribute form { "numeric" | "numeric-leading-zeros" | "ordinal" }?
404 ## long (default): 2005
406 ## Other represents any non-month/day/year date part
408 attribute name { "year" | "other" },
409 attribute form { "short" | "long" }?
410 cs-date-tokens = "issued" | "event" | "accessed" | "container" | "original-date" | "submitted"
413 ## The cs:text element is the main formatting element used to layout down content.
419 ## adds a variable belonging to this item
425 ## adds the results of a macro, as specified in the main body of the CSL
426 attribute macro { token }
428 ## A descriptor that locates sub-item content within a cited resource. Used
429 ## in some styles to indicate specific page numbers for excerpted
430 ## content, for example.
431 attribute point-locator { cs-terms.locator }),
432 attribute form { "short" | "long" }?)
434 ## adds a localized term
435 attribute term { cs-terms },
436 attribute form { cs-term-forms }?,
440 ## adds the text in the value field. use sparingly.
441 ## when dealing with localizable text, <text term="(term)"/> should be
442 ## used, even if this means defining a new term.
443 attribute value { text })
446 ## The number markup directive matches the first number found in a field,
447 ## and returns only that component. If no number is detected, the result
448 ## is empty. A non-empty number may be subject to further formatting consisting
449 ## of a form attribute whose value may be numeric, ordinal or roman to format
450 ## it as a simple number (the default), an ordinal number (1st, 2nd, 3rd etc)
451 ## or roman (i, ii, iii, iv etc). The text-case can also apply to capitalize
452 ## the roman numbers for instance. The other normal formatting rules apply
453 ## too (font-style, ...). When used in a conditional, number tests if
454 ## there is a number present, allowing conditional formatting.
458 attribute variable { "edition" | "volume" | "issue" | "number" | "number-of-volumes" },
459 attribute form { "numeric" | "ordinal" | "roman" }?
463 ## the primary title for the cited item
466 ## the secondary title for the cited item; for a book chapter, this
467 ## would be a book title, for an article the journal title, etc.
470 ## the tertiary title for the cited item; for example, a series title
473 ## collection number; for example, series number
476 ## title of a related original version; often useful in cases of translation
479 ## the name of the publisher
482 ## the location of the publisher
485 ## the name of the archive
488 ## the location of the archive
491 ## the location within an archival collection (for example, box and folder)
494 ## issuing authority (for patents) or judicial authority (such as court
498 ## the name or title of a related event such as a conference or hearing
501 ## the location or place for the related event
507 ## a description to locate an item within some larger container or
508 ## collection; a volume or issue number is a kind of locator, for example.
511 ## version description
514 ## volume number for the container periodical
517 ## refers to the number of items in multi-volume books and such
520 ## refers to the number of pages in a book or other document
523 ## the issue number for the container publication
529 ## medium description (DVD, CD, etc.)
532 ## the (typically publication) status of an item; for example "forthcoming"
535 ## an edition description
538 ## a section description (for newspapers, etc.)
544 ## a short inline note, often used to refer to additional details of the resource
547 ## notes made by a reader about the content of the resource
556 ## a document number; useful for reports and such
559 ## for related referenced resources; this is here for legal case
560 ## histories, but may be relevant for other contexts.
575 ## the number used for the in-text citation mark in numeric styles
578 ## the label used for the in-text citation mark in label styles
581 ## The number of a preceding note containing the first reference to
582 ## this item. Relevant only for note-based styles, and null for first references.
583 "first-reference-note-number"
585 ## The year suffix for author-date styles; e.g. the 'a' in '1999a'.
588 ## The cs:label element.
591 ## The label element is used to print text terms that depend on document content
592 ## for pluralization. For labeling pages, this is preferable, as pages may be
593 ## either singular or plural (p. or pp.)
597 attribute variable { "page" | "locator" }
602 attribute form { cs-term-forms },
604 ## On cs:label, use to modify default pluralization behavior.
607 ## modifies plualization behavior [ a:defaultValue = "contextual" ]
608 plural = attribute plural { xsd:boolean }
611 ## The cs:macro element
614 ## The macro element works something like in BibTeX, and provides a ready-made
615 ## bundle of formatting templates that can be easily reusesd elsewhere.
618 attribute name { token },
623 ## The cs:group element
626 ## Group is used to provide delimiters and a common prefix/suffix. It is syntactic
627 ## sugar for a conditional that tests for the presence of any non-null child variable
628 ## or macro call results. So if there are no such results, then any <text term="(term)">
629 ## content will not be printed.
634 ## the class attribute can be used to pass on styling hooks for CSS and such
635 attribute class { token }?,
640 layout = element cs:layout { formatting, delimiter, cs-element }
641 cs-element = (names | date | label | cs-text | cs-number | choose | group)+
644 ## The cs:citation element
647 ## The cs:citation handles printing of citations. A citation may consist of
648 ## one-or-more references to bibliographic sources. These references can either
649 ## be simple in-text keys [doe99] or numeric markers [1], or more complex short
650 ## descriptors generated at runtime common in author-date (Doe, 1999a) or note-based
652 ## note: one issue unique to note-based styles is that a citation reference
653 ## effectively may become a full sentence. Implementers should consider this in
654 ## their design and insert the final formatted citation in the correct title form.
655 ## For example, if a citation is footnoted without any additional text, the first
656 ## character of the output should be uppercased. By contrast, if the citation is
657 ## within a pre-existing footnote, and preceded by non-citation text, then it should
659 citation = element cs:citation { (citation-options* & sort?), layout }
662 ## The cs:bibliography element
664 bibliography = element cs:bibliography { (bibliography-options* & sort?), layout }
667 ## The cs:option element
669 citation-options = et-al | et-al-subsequent | disambiguate | collapse
670 bibliography-options =
671 et-al | hanging-indent | second-field-align | subsequent-author-substitute | line-formatting | group-by
673 ## Pattern for options that are either true or false
674 option-tf = attribute value { xsd:boolean }
676 ## Sorting and grouping by author assumes by default that the string includes the entire list
677 ## of authors. This option allows you to instead use first author only.
680 attribute name { "group-by" },
681 attribute value { "first-author" }
684 ## sets the bibliographic entries to be rendered with hanging-indents
687 attribute name { "hanging-indent" },
691 ## "citation-number" collapses numeric citations from [1, 2, 3] to [1-3]
692 ## "year" collapses authors from (Doe 2000, Doe 2001) to (Doe 2000,
694 ## "year-suffix" collapses as "year", but also collapses (Doe 2000a,
695 ## Doe 2000b) to (Doe 2000a, b) (ignored if
696 ## disambiguate-add-year-suffix is missing)
699 attribute name { "collapse" },
700 attribute value { "citation-number" | "year" | "year-suffix" }
703 ## second-field-align is useful for formatting a numbered list. It aligns
704 ## any subsequent lines of a bibliography entry with the beginning of the
705 ## second field. For example, if the first field is
706 ## <text variable="citation-number" suffix=". "/>
708 ## 1. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
711 ## If set to "margin," then the first field is put in the margin and all
712 ## subsequent lines of text are aligned with the margin. This is useful for
716 attribute name { "second-field-align" },
717 attribute value { "true" | "margin" }
720 ## substitutes subsequent recurrences of an author for a given string
721 subsequent-author-substitute =
723 attribute name { "subsequent-author-substitute" },
724 attribute value { text }
727 ## defines parameters relating to "et al" formatting:
728 ## et-al-min: the minimum number of contributors to use "et al"
729 ## et-al-use-first: the number of contributors to explicitly print under
730 ## "et al" conditions
731 ## et-al-subsequent-*: same as above, but for subsequent references
735 attribute name { "et-al-min" | "et-al-use-first" },
736 attribute value { xsd:integer }
740 attribute name { "et-al-subsequent-min" | "et-al-subsequent-use-first" },
741 attribute value { xsd:integer }
744 ## defines parameters relating to disambiguation, followed in the order given
745 ## below until a citation is disambiguated
746 ## disambiguate-add-names: add additional names, disregarding
747 ## the "et-al" setting, to disambiguate the citations
748 ## disambiguate-add-givenname: add a given name to a citation
749 ## to disambiguate it (e.g., John Doe, 2005 vs. Doe, 2005)
750 ## disambiguate-add-year-suffix: add a suffix to the year (e.g.,
751 ## 2007a) when there are two works by the same author published in
752 ## the same year included in one bibliography
756 "disambiguate-add-givenname" | "disambiguate-add-names" | "disambiguate-add-year-suffix"
760 # defines spacing between entries and between lines
761 # line-spacing: in units of lines; default 1
762 # entry-spacing: in units of line-spacing; default 1
765 attribute name { "line-spacing" | "entry-spacing" },
766 attribute value { xsd:integer }
770 ## The cs:sort element
772 all-variables = variables | cs-date-tokens | cs-names
774 ## The sort element specifies the sort order for a citation or for the
775 ## bibliography. If it is not added, citations are sorted according to user
776 ## preferences, and bibliography is sorted according to order cited.
777 sort = element cs:sort { key+ }
780 (attribute variable { all-variables }
781 | attribute macro { token }),
783 ## Default sort order is ascending
784 attribute sort { "ascending" | "descending" }?
788 ## The cs:choose element
791 ## The choose elements provides a simple conditional structure.
792 choose = element cs:choose { if, else-if*, else? }
793 if = element cs:if { condition, cs-element* }
794 else-if = element cs:else-if { condition, cs-element* }
795 else = element cs:else { cs-element+ }
798 ## If the entry is of a given type, this is true
803 ## If a given variable exists, this is true
805 list { all-variables+ }
808 ## If a given variable contains numeric data, this is true
809 attribute is-numeric {
810 list { all-variables+ }
813 ## If a given variable contains a date, this s true
815 list { all-variables+ }
818 ## The position of a citation. Whenever position="ibid-with-locator"
819 ## is true, position="ibid" is also true, and whenever position="ibid"
820 ## is true, position="subsequent" is also true
822 list { ("first" | "subsequent" | "ibid" | "ibid-with-locator")+ }
825 ## If text inside an <if disambiguate="true"> block can be used to
826 ## differentiate two otherwise identical citations, it will be added.
827 ## If the citations remain identical after its addition, it will not
829 attribute disambiguate { xsd:boolean }?,
831 ## A conditional on the locator for this specific entry
833 list { cs-terms.locator+ }
835 attribute match { "all" | "any" | "none" }?
838 ## variables and types; needs some more thought
843 | "article-newspaper"
851 | "entry-encyclopedia"
866 | "personal_communication"
877 ## Formatting attributes.
879 delimiter = attribute delimiter { text }?
881 ## attributes are drawn directly from CSS and FO where possible
883 attribute prefix { text }?,
884 attribute suffix { text }?,
885 attribute font-family { text }?,
886 attribute font-style { "italic" | "normal" | "oblique" }?,
887 attribute font-variant { "normal" | "small-caps" }?,
888 attribute font-weight { "normal" | "bold" | "light" }?,
889 attribute text-decoration { "none" | "underline" }?,
890 attribute vertical-align { "baseline" | "sup" | "sub" }?,
891 attribute text-case {
893 ## display all text as lowercase
896 ## display all text as uppercase
899 ## capitalize first character; other characters
903 ## capitalize first character of every word;
904 ## other characters displayed lowercase
907 ## display as title case (the Chicago Manual
908 ## of Style calls this "headline style")
911 ## display as sentence case/sentence style
915 ## For examples such as abstracts and notes in annotated bibliographies
916 ## use the "block" display value. Otherwise, content is displayed inline.
917 attribute display { "block" | "inline-block" }?,
918 attribute quotes { xsd:boolean }?