From 4f8b14cd7ef2bcf80909d0d8a313b90dd8e416d8 Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Sat, 27 Jun 2020 05:51:53 -0400 Subject: [PATCH 01/61] input: change id to v1.0 Closes #281 --- schemas/input/csl-data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/input/csl-data.json b/schemas/input/csl-data.json index c7fec57f..a0b2bf09 100644 --- a/schemas/input/csl-data.json +++ b/schemas/input/csl-data.json @@ -1,7 +1,7 @@ { "description": "JSON schema for CSL input data", "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://resource.citationstyles.org/schema/latest/input/json/csl-data.json", + "$id": "https://resource.citationstyles.org/schema/v1.0/input/json/csl-data.json", "type": "array", "items": { "type": "object", From 9aa71881f6af79ec30fdcb4e558dd18fb229b4c4 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Tue, 30 Jun 2020 12:50:13 -0400 Subject: [PATCH 02/61] Add new terms (#283) Closes https://github.com/citation-style-language/schema/issues/103 Closes https://github.com/citation-style-language/csl-evolution/issues/34 --- schemas/styles/csl-terms.rnc | 47 ++++++++++++++++++++++++++------ schemas/styles/csl-variables.rnc | 2 +- 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/schemas/styles/csl-terms.rnc b/schemas/styles/csl-terms.rnc index 6998aa20..41eaa0c2 100644 --- a/schemas/styles/csl-terms.rnc +++ b/schemas/styles/csl-terms.rnc @@ -16,16 +16,22 @@ div { ## Miscellaneous terms "accessed" | "ad" + | "advance-online-publication" + | "album" | "and" | "and others" | "anonymous" | "at" + | "audio-recording" | "available at" | "bc" + | "bce" | "by" + | "ce" | "circa" | "cited" | "et-al" + | "film" | "forthcoming" | "from" | "ibid" @@ -34,15 +40,33 @@ div { | "internet" | "interview" | "letter" + | "loc-cit" | "no date" - | "no-name" | "no-place" + | "no-publisher" + | "on" | "online" + | "op-cit" + | "original-work-published" + | "personal-communication" + | "podcast" + | "podcast-episode" + | "preprint" | "presented at" + | "radio-broadcast" + | "radio-series" + | "radio-series-episode" | "reference" | "retrieved" + | "review-of" | "scale" - | "version" + | "special-issue" + | "special-section" + | "television-broadcast" + | "television-series" + | "television-series-episode" + | "video" + | "working-paper" | ## Punctuation "open-quote" @@ -111,7 +135,7 @@ div { ## ("sub verbo" can be tested with "sub-verbo") terms.locator.testable = "appendix" - | "article" + | "article-locator" | "book" | "canon" | "chapter" @@ -123,12 +147,8 @@ div { | "line" | "note" | "opus" - | "page" | "paragraph" - | "part" | "rule" - | "section" - | "supplement" | "table" | "timestamp" | "title" @@ -136,14 +156,25 @@ div { | terms.locator-number-variables ## Locator terms with matching number variables - terms.locator-number-variables = "issue" | "volume" + terms.locator-number-variables = + "issue" + | "page" + | "part" + | "section" + | "supplement" + | "version" + | "volume" ## Non-locator terms accompanying number variables terms.non-locator-number-variables = "chapter-number" + | "citation-number" | "collection-number" | "edition" + | "first-reference-note-number" | "number" | "number-of-pages" | "number-of-volumes" + | "page-first" + | "printing" } diff --git a/schemas/styles/csl-variables.rnc b/schemas/styles/csl-variables.rnc index 08c146d5..37a30518 100644 --- a/schemas/styles/csl-variables.rnc +++ b/schemas/styles/csl-variables.rnc @@ -74,8 +74,8 @@ div { | "archive-place" | "authority" | "call-number" - | "citation-label" | "citation-key" + | "citation-label" | "collection-title" | "container-title" | "container-title-short" From bc4cd7a7324a41a444265037bcad9838f70b2870 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Wed, 8 Jul 2020 06:06:38 -0400 Subject: [PATCH 03/61] Add volume-title to data schema --- schemas/input/csl-data.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/schemas/input/csl-data.json b/schemas/input/csl-data.json index a0b2bf09..eaf182e9 100644 --- a/schemas/input/csl-data.json +++ b/schemas/input/csl-data.json @@ -418,6 +418,12 @@ "volume": { "type": ["string", "number"] }, + "volume-title": { + "type": "string" + }, + "volume-title-short": { + "type": "string" + }, "year-suffix": { "type": "string" } From 6964e6de7e131343cb152bb78f1717c93fe15f6a Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Wed, 8 Jul 2020 06:12:42 -0400 Subject: [PATCH 04/61] Remove new international identifiers Defer to a more general `identifier` solution cf. https://discourse.citationstyles.org/t/csl-1-0-2-and-1-1-development-window-open/1652/9?u=bwiernik --- schemas/input/csl-data.json | 15 --------------- schemas/styles/csl-variables.rnc | 5 ----- 2 files changed, 20 deletions(-) diff --git a/schemas/input/csl-data.json b/schemas/input/csl-data.json index eaf182e9..5e6c48f0 100644 --- a/schemas/input/csl-data.json +++ b/schemas/input/csl-data.json @@ -289,27 +289,12 @@ "genre": { "type": "string" }, - "ISAN": { - "type": "string" - }, "ISBN": { "type": "string" }, - "ISCI": { - "type": "string" - }, - "ISMN": { - "type": "string" - }, - "ISRC": { - "type": "string" - }, "ISSN": { "type": "string" }, - "ISWC": { - "type": "string" - }, "issue": { "type": ["string", "number"] }, diff --git a/schemas/styles/csl-variables.rnc b/schemas/styles/csl-variables.rnc index 37a30518..b3e4cfb8 100644 --- a/schemas/styles/csl-variables.rnc +++ b/schemas/styles/csl-variables.rnc @@ -85,13 +85,8 @@ div { | "event" | "event-place" | "genre" - | "ISAN" | "ISBN" - | "ISCI" - | "ISMN" - | "ISRC" | "ISSN" - | "ISWC" | "jurisdiction" | "keyword" | "language" From 43a0d3f03f6b9ebd819b144c1af52f5c824a282e Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Wed, 8 Jul 2020 06:51:42 -0400 Subject: [PATCH 05/61] Add remaining media roles Addresses https://github.com/citation-style-language/schema/issues/293 --- schemas/input/csl-data.json | 30 ++++++++++++++++++++++++++++++ schemas/styles/csl-variables.rnc | 5 +++++ 2 files changed, 35 insertions(+) diff --git a/schemas/input/csl-data.json b/schemas/input/csl-data.json index 5e6c48f0..40473cd8 100644 --- a/schemas/input/csl-data.json +++ b/schemas/input/csl-data.json @@ -118,6 +118,12 @@ "$ref": "#/definitions/name-variable" } }, + "creator": { + "type": "array", + "items": { + "$ref": "#/definitions/name-variable" + } + }, "curator": { "type": "array", "items": { @@ -148,6 +154,18 @@ "$ref": "#/definitions/name-variable" } }, + "guest": { + "type": "array", + "items": { + "$ref": "#/definitions/name-variable" + } + }, + "host": { + "type": "array", + "items": { + "$ref": "#/definitions/name-variable" + } + }, "interviewer": { "type": "array", "items": { @@ -160,6 +178,12 @@ "$ref": "#/definitions/name-variable" } }, + "narrator": { + "type": "array", + "items": { + "$ref": "#/definitions/name-variable" + } + }, "organizer": { "type": "array", "items": { @@ -202,6 +226,12 @@ "$ref": "#/definitions/name-variable" } }, + "writer": { + "type": "array", + "items": { + "$ref": "#/definitions/name-variable" + } + }, "accessed": { "$ref": "#/definitions/date-variable" }, diff --git a/schemas/styles/csl-variables.rnc b/schemas/styles/csl-variables.rnc index b3e4cfb8..588cbc21 100644 --- a/schemas/styles/csl-variables.rnc +++ b/schemas/styles/csl-variables.rnc @@ -28,13 +28,17 @@ div { | "composer" | "container-author" | "contributor" + | "creator" | "curator" | "director" | "editor" | "editorial-director" | "executive-producer" + | "guest" + | "host" | "illustrator" | "interviewer" + | "narrator" | "organizer" | "original-author" | "performer" @@ -42,6 +46,7 @@ div { | "recipient" | "reviewed-author" | "translator" + | "writer" ## Number variables variables.numbers = From c9c46eafaed75e57966c817d5fe3db2edcde261a Mon Sep 17 00:00:00 2001 From: bdarcus Date: Tue, 26 May 2020 13:25:02 -0400 Subject: [PATCH 06/61] add new cs:intext element (#193) Supports definition of AuthorOnly rendering required to assemble intext (aka narrative, or textual) citations. Closes #141. --- schemas/styles/csl.rnc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index 558323c6..c01a812e 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -43,6 +43,7 @@ div { (style.locale* & style.macro* & style.citation + & style.intext? & style.bibliography?) } dependent-style.style = @@ -352,6 +353,15 @@ div { ## Use to describe the formatting of citations. element cs:citation { citation.options, sort?, citation.layout } + + style.intext = + + ## Defines the author-only rendering for assembly of a textual citations + ## (for example, "Doe [3]" or "Doe (2018)"), where the output expectations + ## for in-text authors are different than the default citation rendering; + ## for example, in APA, or numeric styles. + element cs:intext { citation.options, sort?, citation.layout } + style.bibliography = ## Use to describe the formatting of the bibliography. From 8c8bd4df4a7a5a245490ecbd4fc2450aec770874 Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Tue, 26 May 2020 13:27:17 -0400 Subject: [PATCH 07/61] change version number from "1.0" to "1.1" Updating the version number for v1.1. We are not maintaining a modular schema that supports both versions. Rather, the expectation is one would use separate schema files to validate different major versions. --- schemas/styles/csl.rnc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index c01a812e..68200f81 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -55,8 +55,8 @@ div { } version = - ## Indicate CSL version compatibility ("1.0" for CSL 1.0). - [ a:defaultValue = "1.0" ] attribute version { "1.0" } + ## Indicate CSL version compatibility. + [ a:defaultValue = "1.1" ] attribute version { "1.1" } ## Obsolete for dependent styles. Will be disallowed with CSL 1.1. dependent-style.style.legacy-attributes = From 649df28f57768422d501df34add6ae27a949b0cb Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Tue, 26 May 2020 14:03:41 -0400 Subject: [PATCH 08/61] remove dependent-style.style.legacy-attributes Per warning note in 1.0.1, this removes this pattern. --- schemas/styles/csl.rnc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index 68200f81..d4c549ed 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -50,18 +50,12 @@ div { element cs:style { style.default-locale, version, - dependent-style.style.info, - dependent-style.style.legacy-attributes + dependent-style.style.info } version = ## Indicate CSL version compatibility. [ a:defaultValue = "1.1" ] attribute version { "1.1" } - - ## Obsolete for dependent styles. Will be disallowed with CSL 1.1. - dependent-style.style.legacy-attributes = - attribute class { "in-text" | "note" }?, - style.options } # ============================================================================== From d1f8a873b6f2f4b25bfe86cfac7d119bbc091b89 Mon Sep 17 00:00:00 2001 From: bdarcus Date: Thu, 28 May 2020 14:39:00 -0400 Subject: [PATCH 09/61] Change "and" to allow "short", use term (#196) This adds "short" form for "and"; makes "symbol" configurable. With this change, "and" rendering would be configured using the localized "and" term. closes #137 --- schemas/styles/csl.rnc | 417 +++++++++++++++++++++++++---------------- 1 file changed, 253 insertions(+), 164 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index d4c549ed..c7e9efff 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -31,9 +31,10 @@ include "csl-categories.rnc" 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, @@ -46,12 +47,29 @@ div { & style.intext? & style.bibliography?) } + dependent-style.style = element cs:style { style.default-locale, version, dependent-style.style.info } + + 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) + } + + style.default-locale = + + ## Set a default style locale. + attribute default-locale { xsd:language }? + version = ## Indicate CSL version compatibility. @@ -61,7 +79,7 @@ div { ## cs:info - Style and Locale File Metadata div { - + ## Metadata for independent styles. independent-style.style.info = element cs:info { @@ -80,7 +98,7 @@ div { & info.title-short? & info.updated } - + ## Metadata for dependent styles. dependent-style.style.info = element cs:info { @@ -99,19 +117,24 @@ div { & 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). @@ -119,92 +142,106 @@ div { 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 = + 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 = + 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" - | + | ## Obsolete for independent styles. Will be disallowed with ## CSL 1.1. "independent-parent" }, 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" - | + | ## Obsolete for dependent styles. Will be disallowed with CSL ## 1.1. "template" }, 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 @@ -214,10 +251,10 @@ div { ## 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 }?, @@ -228,23 +265,24 @@ div { ## 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 { @@ -254,6 +292,7 @@ div { locale-file.locale.info?, (locale.style-options & locale.date+ & locale.terms) } + style.default-locale = ## Set a default style locale. @@ -266,23 +305,26 @@ div { 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 = @@ -290,6 +332,7 @@ div { term.attributes, (text | (term.single, term.multiple)) } + term.attributes = (attribute name { terms }, [ a:defaultValue = "long" ] attribute form { term.form }?) @@ -305,17 +348,18 @@ div { | (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 } } @@ -324,12 +368,13 @@ div { ## cs:macro div { style.macro = - + ## Use to create collections of (reusable) formatting instructions. element cs:macro { attribute name { xsd:NMTOKEN }, rendering-element+ } + rendering-element = rendering-element.names | rendering-element.date @@ -344,7 +389,7 @@ div { ## cs:citation and cs:bibliography div { style.citation = - + ## Use to describe the formatting of citations. element cs:citation { citation.options, sort?, citation.layout } @@ -357,15 +402,17 @@ div { element cs:intext { 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+ } } @@ -379,21 +426,23 @@ div { ((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 @@ -401,146 +450,154 @@ div { [ 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. + ## the "and" term. attribute and { - - ## Use the "and" term (e.g., "Doe, Johnson and Smith"). - "text" - | - ## Use the "ampersand" (e.g., "Doe, Johnson & Smith"). + + ## Use the "and" term "long" form (e.g., "Doe, Johnson and Smith"). + "long" + | + ## Use the "and" term "symbol" form (e.g., "Doe, Johnson & Smith"). "symbol" + | + ## Use the "and" term "short" form. Not common in English, but is seen in other languages. + ## In German, for example: "Doe, Johnson u. Smith, where "u." is short for "und." + "short" }?, - + ## 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, names.et-al.legacy-attributes } - + ## Ignored in CSL 1.0.1. Will be disallowed with CSL 1.1. names.et-al.legacy-attributes = affixes - + ## 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 } } @@ -555,13 +612,13 @@ div { ## 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" }?, @@ -573,8 +630,9 @@ div { 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 @@ -583,24 +641,27 @@ div { 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" ] @@ -609,14 +670,16 @@ div { }?, 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. @@ -627,7 +690,7 @@ div { ## cs:text Rendering Element div { rendering-element.text = - + ## Use to call macros, render variables, terms, or verbatim text. element cs:text { text.attributes, @@ -638,18 +701,19 @@ div { 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 } | ( @@ -662,14 +726,15 @@ div { ## 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" ] @@ -680,17 +745,19 @@ div { ## 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" }?, @@ -704,7 +771,7 @@ div { ## 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 @@ -718,6 +785,7 @@ div { font-formatting, rendering-element+ } + group.attributes = notAllowed? } # ============================================================================== @@ -730,6 +798,7 @@ div { style.page-range-format, names-inheritable-options, name-inheritable-options + citation.options = citation.cite-group-delimiter, citation.collapse-options, @@ -737,6 +806,7 @@ div { citation.near-note-distance, names-inheritable-options, name-inheritable-options + bibliography.options = bibliography.hanging-indent, bibliography.line-formatting-options, @@ -744,178 +814,189 @@ div { 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 { "chicago" | "expanded" | "minimal" | "minimal-two" }? + 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" }? @@ -925,28 +1006,29 @@ div { ## 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" }? @@ -957,35 +1039,39 @@ div { ## cs:choose - Conditional Statements" div { rendering-element.choose = - + ## Use to conditionally render rendering elements. element cs:choose { choose.if, choose.else-if*, choose.else? } + choose.if = element cs:if { condition+, match, rendering-element* } + choose.else-if = element cs:else-if { condition+, match, rendering-element* } + choose.else = element cs:else { rendering-element+ } + condition = - + ## If used, the element content is only rendered if it disambiguates two ## otherwise identical citations. This attempt at disambiguation is only ## made after all other disambiguation methods have failed. [ a:defaultValue = "true" ] attribute disambiguate { "true" } - | + | ## Tests whether the given variables contain numeric text. attribute is-numeric { list { variables+ } } - | + | ## Tests whether the given date variables contain approximate dates. attribute is-uncertain-date { list { variables.dates+ } } - | + | ## Tests whether the locator matches the given locator types. attribute locator { list { (terms.locator.testable | "sub-verbo")+ } } - | + | ## Tests whether the cite position matches the given positions. attribute position { list { @@ -996,31 +1082,32 @@ div { | "near-note")+ } } - | + | ## Tests whether the item matches the given types. attribute type { list { item-types+ } } - | + | ## Tests whether the default ("long") forms of the given variables ## contain non-empty values. attribute variable { list { variables+ } } + match = - + ## Set the testing logic. [ a:defaultValue = "all" ] attribute match { - + ## Element only tests "true" when all conditions test "true" for all ## given test values. "all" - | + | ## Element tests "true" when any condition tests "true" for any given ## test value. "any" - | + | ## Element only tests "true" when none of the conditions test "true" ## for any given test value. "none" @@ -1033,29 +1120,31 @@ 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" ] @@ -1068,36 +1157,36 @@ div { 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" - | + | ## Capitalizes the first character (other characters remain in ## their original case). "capitalize-first" - | + | ## Capitalizes the first character of every word (other characters ## remain in their original case). "capitalize-all" - | + | ## Renders text in title case. "title" - | - ## Renders text in sentence case. Deprecated. - "sentence" }? } From b5f268903b331279a9c264a844db0fb761cdd418 Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Thu, 4 Jun 2020 08:24:37 -0400 Subject: [PATCH 10/61] Reformat csl.rnc using trang This updates to normalize the formatting and whitespace, using trang. --- schemas/styles/csl.rnc | 323 ++++++++++++++++++++--------------------- 1 file changed, 159 insertions(+), 164 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index c7e9efff..2cd56219 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -34,7 +34,7 @@ div { independent-style.style = element cs:style { - + ## Select whether citations appear in-text or as notes. attribute class { "in-text" | "note" }, style.default-locale, @@ -50,9 +50,7 @@ div { dependent-style.style = element cs:style { - style.default-locale, - version, - dependent-style.style.info + style.default-locale, version, dependent-style.style.info } locale-file.locale = @@ -79,7 +77,7 @@ div { ## cs:info - Style and Locale File Metadata div { - + ## Metadata for independent styles. independent-style.style.info = element cs:info { @@ -98,7 +96,7 @@ div { & info.title-short? & info.updated } - + ## Metadata for dependent styles. dependent-style.style.info = element cs:info { @@ -117,7 +115,7 @@ div { & info.title-short? & info.updated } - + ## Metadata for locale files. locale-file.locale.info = element cs:info { info.translator* & info.rights? & info.updated? } @@ -134,7 +132,7 @@ div { & 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). @@ -151,40 +149,38 @@ div { 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" - | + | ## Obsolete for independent styles. Will be disallowed with ## CSL 1.1. "independent-parent" @@ -195,20 +191,20 @@ div { 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" - | + | ## Obsolete for dependent styles. Will be disallowed with CSL ## 1.1. "template" @@ -217,7 +213,7 @@ div { } info.published = - + ## Specify when the style was initially created or made available. element cs:published { xsd:dateTime } @@ -232,12 +228,12 @@ div { 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 } @@ -251,10 +247,10 @@ div { ## 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 }?, @@ -265,18 +261,18 @@ div { ## 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" ] @@ -307,13 +303,13 @@ div { } 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" } @@ -324,7 +320,7 @@ div { } 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 = @@ -348,18 +344,18 @@ div { | (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 } } @@ -368,7 +364,7 @@ div { ## cs:macro div { style.macro = - + ## Use to create collections of (reusable) formatting instructions. element cs:macro { attribute name { xsd:NMTOKEN }, @@ -389,12 +385,11 @@ div { ## cs:citation and cs:bibliography div { style.citation = - + ## Use to describe the formatting of citations. element cs:citation { citation.options, sort?, citation.layout } - style.intext = - + ## Defines the author-only rendering for assembly of a textual citations ## (for example, "Doe [3]" or "Doe (2018)"), where the output expectations ## for in-text authors are different than the default citation rendering; @@ -402,7 +397,7 @@ div { element cs:intext { citation.options, sort?, citation.layout } style.bibliography = - + ## Use to describe the formatting of the bibliography. element cs:bibliography { bibliography.options, sort?, bibliography.layout @@ -432,7 +427,7 @@ div { list { variables.names+ } }, affixes, - + ## Specify the delimiter for name lists of name variables rendered by ## the same cs:names element. delimiter, @@ -442,7 +437,7 @@ div { 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 @@ -450,7 +445,7 @@ div { [ 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, @@ -459,109 +454,109 @@ div { } name.attributes = - + ## Use to separate the second-to-last and last name of a name list by ## the "and" term. attribute and { - + ## Use the "and" term "long" form (e.g., "Doe, Johnson and Smith"). "long" - | + | ## Use the "and" term "symbol" form (e.g., "Doe, Johnson & Smith"). "symbol" - | + | ## Use the "and" term "short" form. Not common in English, but is seen in other languages. ## In German, for example: "Doe, Johnson u. Smith, where "u." is short for "und." "short" }?, - + ## 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" }, @@ -571,20 +566,20 @@ div { } 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, names.et-al.legacy-attributes } - + ## Ignored in CSL 1.0.1. Will be disallowed with CSL 1.1. names.et-al.legacy-attributes = affixes - + ## Inherits variable from the parent cs:names element. names.label = element cs:label { @@ -593,11 +588,11 @@ div { } 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 } } @@ -612,13 +607,13 @@ div { ## 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" }?, @@ -632,7 +627,7 @@ div { } 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 @@ -643,7 +638,7 @@ div { } 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 { @@ -652,7 +647,7 @@ div { day = attribute name { "day" }, - + ## Day forms: "numeric" ("5"), "numeric-leading-zeros" ("05"), "ordinal" ## ("5th"). [ a:defaultValue = "numeric" ] @@ -661,7 +656,7 @@ div { month = attribute name { "month" }, - + ## Months forms: "long" (e.g., "January"), "short" ("Jan."), "numeric" ## ("1"), and "numeric-leading-zeros" ("01"). [ a:defaultValue = "long" ] @@ -673,13 +668,13 @@ div { 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. @@ -690,7 +685,7 @@ div { ## cs:text Rendering Element div { rendering-element.text = - + ## Use to call macros, render variables, terms, or verbatim text. element cs:text { text.attributes, @@ -703,17 +698,17 @@ div { } 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 } | ( @@ -726,7 +721,7 @@ div { ## 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 @@ -734,7 +729,7 @@ div { number.attributes = attribute variable { variables.numbers }, - + ## Number forms: "numeric" ("4"), "ordinal" ("4th"), "long-ordinal" ## ("fourth"), "roman" ("iv"). [ a:defaultValue = "numeric" ] @@ -745,7 +740,7 @@ div { ## 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.". @@ -757,7 +752,7 @@ div { 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" }?, @@ -771,7 +766,7 @@ div { ## 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 @@ -816,7 +811,7 @@ div { 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" ] @@ -825,101 +820,101 @@ div { }? 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 { "chicago" | "expanded" | "minimal" | "minimal-two" }? 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". @@ -927,17 +922,17 @@ div { 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 { @@ -945,58 +940,58 @@ div { }? 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" }? @@ -1006,7 +1001,7 @@ div { ## 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+ } @@ -1015,20 +1010,20 @@ div { 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" }? @@ -1039,7 +1034,7 @@ div { ## cs:choose - Conditional Statements" div { rendering-element.choose = - + ## Use to conditionally render rendering elements. element cs:choose { choose.if, choose.else-if*, choose.else? } @@ -1051,27 +1046,27 @@ div { choose.else = element cs:else { rendering-element+ } condition = - + ## If used, the element content is only rendered if it disambiguates two ## otherwise identical citations. This attempt at disambiguation is only ## made after all other disambiguation methods have failed. [ a:defaultValue = "true" ] attribute disambiguate { "true" } - | + | ## Tests whether the given variables contain numeric text. attribute is-numeric { list { variables+ } } - | + | ## Tests whether the given date variables contain approximate dates. attribute is-uncertain-date { list { variables.dates+ } } - | + | ## Tests whether the locator matches the given locator types. attribute locator { list { (terms.locator.testable | "sub-verbo")+ } } - | + | ## Tests whether the cite position matches the given positions. attribute position { list { @@ -1082,12 +1077,12 @@ div { | "near-note")+ } } - | + | ## Tests whether the item matches the given types. attribute type { list { item-types+ } } - | + | ## Tests whether the default ("long") forms of the given variables ## contain non-empty values. attribute variable { @@ -1095,19 +1090,19 @@ div { } match = - + ## Set the testing logic. [ a:defaultValue = "all" ] attribute match { - + ## Element only tests "true" when all conditions test "true" for all ## given test values. "all" - | + | ## Element tests "true" when any condition tests "true" for any given ## test value. "any" - | + | ## Element only tests "true" when none of the conditions test "true" ## for any given test value. "none" @@ -1124,27 +1119,27 @@ div { 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" ] @@ -1159,33 +1154,33 @@ div { 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" - | + | ## Capitalizes the first character (other characters remain in ## their original case). "capitalize-first" - | + | ## Capitalizes the first character of every word (other characters ## remain in their original case). "capitalize-all" - | + | ## Renders text in title case. "title" }? From bef8471e0db9da9551e2125a208f91777181a681 Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Thu, 4 Jun 2020 09:04:00 -0400 Subject: [PATCH 11/61] Remove names.et-al.legacy-attributes pattern (#221) --- schemas/styles/csl.rnc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index 2cd56219..3eceb71c 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -573,13 +573,9 @@ div { ## Select the term to use for et-al abbreviation. [ a:defaultValue = "et-al" ] attribute term { "et-al" | "and others" }?, - font-formatting, - names.et-al.legacy-attributes + font-formatting } - - ## Ignored in CSL 1.0.1. Will be disallowed with CSL 1.1. - names.et-al.legacy-attributes = affixes - + ## Inherits variable from the parent cs:names element. names.label = element cs:label { From 40c4f7ff61b77e8baf60540071da1717fcfcf80e Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Thu, 4 Jun 2020 09:04:21 -0400 Subject: [PATCH 12/61] Remove deprecated attribute values (#222) This removes the deprecated "template" and "independent-parent" attribute values, and closes #58. --- schemas/styles/csl.rnc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index 3eceb71c..14ce79ab 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -180,10 +180,6 @@ div { | ## URI of style documentation. "documentation" - | - ## Obsolete for independent styles. Will be disallowed with - ## CSL 1.1. - "independent-parent" }, info-text } @@ -204,10 +200,6 @@ div { | ## URI of style documentation. "documentation" - | - ## Obsolete for dependent styles. Will be disallowed with CSL - ## 1.1. - "template" }, info-text } From 5ee81795e226d436db2662da94c349022f1174fe Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Thu, 4 Jun 2020 20:12:54 -0400 Subject: [PATCH 13/61] Add 1.0 to 1.1 update xslt This is the start of a stylesheet that will update 1.0 styles to 1.1. --- tools/csl-update.xsl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tools/csl-update.xsl diff --git a/tools/csl-update.xsl b/tools/csl-update.xsl new file mode 100644 index 00000000..f7f988ac --- /dev/null +++ b/tools/csl-update.xsl @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + 1.1 + + + + + + + From e5bb1cdfe58943f2675e8a4433937c2c044a65a7 Mon Sep 17 00:00:00 2001 From: Denis Maier Date: Sun, 14 Jun 2020 15:22:03 +0200 Subject: [PATCH 14/61] Split title -> Title-main/title-sub (#203) This adds distinct variables for different parts of a title, and attributes that instruct processors how these variables can be derived from regular title variables, how titles should be re-assembled from these derived variables, and which delimiters to use for that. It also adds a new option "capitalize-subtitle" to text-case. Closes citation-style-language/csl-evolution#31 --- schemas/styles/csl-variables.rnc | 33 +++++++++++++++++--- schemas/styles/csl.rnc | 52 +++++++++++++++++++++++++++++++- 2 files changed, 80 insertions(+), 5 deletions(-) diff --git a/schemas/styles/csl-variables.rnc b/schemas/styles/csl-variables.rnc index 588cbc21..cf0f8fd8 100644 --- a/schemas/styles/csl-variables.rnc +++ b/schemas/styles/csl-variables.rnc @@ -8,7 +8,8 @@ div { variables = variables.dates | variables.names | variables.standard ## Standard variables - variables.standard = variables.numbers | variables.strings + variables.standard = + variables.numbers | variables.strings | variables.titles ## Date variables variables.dates = @@ -69,6 +70,33 @@ div { | "version" | "volume" + ## Title variables + variables.titles = + "collection-title" + | "collection-title-main" + | "collection-title-sub" + | "collection-title-short" + | "container-title" + | "container-title-main" + | "container-title-sub" + | "container-title-short" + | "original-title" + | "original-title-main" + | "original-title-sub" + | "original-title-short" + | "reviewed-title" + | "reviewed-title-main" + | "reviewed-title-sub" + | "reviewed-title-short" + | "volume-title" + | "volume-title-main" + | "volume-title-sub" + | "volume-title-short" + | "title" + | "title-main" + | "title-sub" + | "title-short" + ## String variables variables.strings = "abstract" @@ -81,9 +109,6 @@ div { | "call-number" | "citation-key" | "citation-label" - | "collection-title" - | "container-title" - | "container-title-short" | "dimensions" | "division" | "DOI" diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index 14ce79ab..4c46cdba 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -368,6 +368,7 @@ div { | rendering-element.date | rendering-element.label | rendering-element.text + | rendering-element.title | rendering-element.number | rendering-element.choose | rendering-element.group @@ -567,7 +568,7 @@ div { attribute term { "et-al" | "and others" }?, font-formatting } - + ## Inherits variable from the parent cs:names element. names.label = element cs:label { @@ -779,6 +780,7 @@ div { style.demote-non-dropping-particle, style.initialize-with-hyphen, style.page-range-format, + title-inheritable-options, names-inheritable-options, name-inheritable-options @@ -787,6 +789,7 @@ div { citation.collapse-options, citation.disambiguate-options, citation.near-note-distance, + title-inheritable-options, names-inheritable-options, name-inheritable-options @@ -795,6 +798,7 @@ div { bibliography.line-formatting-options, bibliography.second-field-align, bibliography.subsequent-author-substitute-options, + title-inheritable-options, names-inheritable-options, name-inheritable-options @@ -967,6 +971,48 @@ div { "partial-first" }? + ## Options affecting rendering of title variables, for cs:style, cs:citation and cs:bibliography + title-inheritable-options = + + ## Inheritable title option, specify the delimiter between "title-main" and "title-sub". + attribute title-delimiter { text }?, + + ## Inheritable title option, specify the delimiter between multiple subtitles. + ## The same as "title-delimiter" if not specified. + attribute title-sub-delimiter { text }?, + + ## Inheritable title option, specify how titles are split into "title-main" and "title-sub". + [ a:defaultValue = "simple" ] + attribute title-split { + + ## Matches "."", ":", "::", "!", "?" + "simple" + | + ## Matches the values for "simple" plus ";" + "extended" + | + ## Matches the values for "simple" plus "—" and ";" + "full" + | + ## Matches the values for "simple" plus ";"" + ## and "[;,] or[,:]" (see CMoS 14.91), e.g. "Moby-Dick; or, The Whale" + "chicago" + }?, + + ## Inheritable title option, specify which delimiters are normalized. + [ a:defaultValue = "simple" ] + attribute normalize-title-delimiters { + + ## Normalize "."", ":", "::" + "simple" + | + ## Normalize the values for "simple" plus ";" + "extended" + | + ## Normalize the values for "simple" plus "—" and ";" + "full" + }? + ## Options affecting cs:names, for cs:style, cs:citation and cs:bibliography. names-inheritable-options = @@ -1164,6 +1210,10 @@ div { ## Capitalizes the first character (other characters remain in ## their original case). "capitalize-first" + | + ## Capitalizes the first character and the first character of a subtitle + ## (other characters remain in their original case). + "capitalize-subtitle" | ## Capitalizes the first character of every word (other characters ## remain in their original case). From 0103ba494c9281b628dd10d27a7f59ab18930775 Mon Sep 17 00:00:00 2001 From: bdarcus Date: Tue, 26 May 2020 13:25:02 -0400 Subject: [PATCH 15/61] add new cs:intext element (#193) Supports definition of AuthorOnly rendering required to assemble intext (aka narrative, or textual) citations. Closes #141. --- schemas/styles/csl.rnc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index 4c46cdba..d39333d6 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -381,8 +381,9 @@ div { ## Use to describe the formatting of citations. element cs:citation { citation.options, sort?, citation.layout } + style.intext = - + ## Defines the author-only rendering for assembly of a textual citations ## (for example, "Doe [3]" or "Doe (2018)"), where the output expectations ## for in-text authors are different than the default citation rendering; From 5878df62b8275d4a310a6a752304adff54446af1 Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Tue, 26 May 2020 13:27:17 -0400 Subject: [PATCH 16/61] change version number from "1.0" to "1.1" Updating the version number for v1.1. We are not maintaining a modular schema that supports both versions. Rather, the expectation is one would use separate schema files to validate different major versions. --- schemas/styles/csl.rnc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index d39333d6..9a47deeb 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -50,7 +50,9 @@ div { dependent-style.style = element cs:style { - style.default-locale, version, dependent-style.style.info + style.default-locale, + version, + dependent-style.style.info } locale-file.locale = From 0a4b5ede501c3eadd3aaba0398949f79d04d89e1 Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Tue, 26 May 2020 14:03:41 -0400 Subject: [PATCH 17/61] remove dependent-style.style.legacy-attributes Per warning note in 1.0.1, this removes this pattern. --- schemas/styles/csl.rnc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index 9a47deeb..228055d0 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -50,8 +50,8 @@ div { dependent-style.style = element cs:style { - style.default-locale, - version, + style.default-locale, + version, dependent-style.style.info } From c2684689e2821501087d9b5761fcffcb4e9c6a0c Mon Sep 17 00:00:00 2001 From: bdarcus Date: Thu, 28 May 2020 14:39:00 -0400 Subject: [PATCH 18/61] Change "and" to allow "short", use term (#196) This adds "short" form for "and"; makes "symbol" configurable. With this change, "and" rendering would be configured using the localized "and" term. closes #137 --- schemas/styles/csl.rnc | 306 +++++++++++++++++++++-------------------- 1 file changed, 154 insertions(+), 152 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index 228055d0..467cd768 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -34,7 +34,7 @@ div { independent-style.style = element cs:style { - + ## Select whether citations appear in-text or as notes. attribute class { "in-text" | "note" }, style.default-locale, @@ -79,7 +79,7 @@ div { ## cs:info - Style and Locale File Metadata div { - + ## Metadata for independent styles. independent-style.style.info = element cs:info { @@ -98,7 +98,7 @@ div { & info.title-short? & info.updated } - + ## Metadata for dependent styles. dependent-style.style.info = element cs:info { @@ -117,7 +117,7 @@ div { & info.title-short? & info.updated } - + ## Metadata for locale files. locale-file.locale.info = element cs:info { info.translator* & info.rights? & info.updated? } @@ -134,7 +134,7 @@ div { & 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). @@ -151,35 +151,37 @@ div { 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" }, @@ -189,17 +191,17 @@ div { 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" }, @@ -207,7 +209,7 @@ div { } info.published = - + ## Specify when the style was initially created or made available. element cs:published { xsd:dateTime } @@ -222,12 +224,12 @@ div { 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 } @@ -241,10 +243,10 @@ div { ## 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 }?, @@ -255,18 +257,18 @@ div { ## 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" ] @@ -297,13 +299,13 @@ div { } 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" } @@ -314,7 +316,7 @@ div { } 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 = @@ -338,18 +340,18 @@ div { | (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 } } @@ -358,7 +360,7 @@ div { ## cs:macro div { style.macro = - + ## Use to create collections of (reusable) formatting instructions. element cs:macro { attribute name { xsd:NMTOKEN }, @@ -380,7 +382,7 @@ div { ## cs:citation and cs:bibliography div { style.citation = - + ## Use to describe the formatting of citations. element cs:citation { citation.options, sort?, citation.layout } @@ -393,7 +395,7 @@ div { element cs:intext { citation.options, sort?, citation.layout } style.bibliography = - + ## Use to describe the formatting of the bibliography. element cs:bibliography { bibliography.options, sort?, bibliography.layout @@ -423,7 +425,7 @@ div { list { variables.names+ } }, affixes, - + ## Specify the delimiter for name lists of name variables rendered by ## the same cs:names element. delimiter, @@ -433,7 +435,7 @@ div { 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 @@ -441,7 +443,7 @@ div { [ 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, @@ -450,122 +452,122 @@ div { } name.attributes = - + ## Use to separate the second-to-last and last name of a name list by ## the "and" term. attribute and { - + ## Use the "and" term "long" form (e.g., "Doe, Johnson and Smith"). "long" - | + | ## Use the "and" term "symbol" form (e.g., "Doe, Johnson & Smith"). "symbol" - | + | ## Use the "and" term "short" form. Not common in English, but is seen in other languages. ## In German, for example: "Doe, Johnson u. Smith, where "u." is short for "und." "short" }?, - + ## 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" }?, @@ -580,11 +582,11 @@ div { } 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 } } @@ -599,13 +601,13 @@ div { ## 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" }?, @@ -619,7 +621,7 @@ div { } 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 @@ -630,7 +632,7 @@ div { } 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 { @@ -639,7 +641,7 @@ div { day = attribute name { "day" }, - + ## Day forms: "numeric" ("5"), "numeric-leading-zeros" ("05"), "ordinal" ## ("5th"). [ a:defaultValue = "numeric" ] @@ -648,7 +650,7 @@ div { month = attribute name { "month" }, - + ## Months forms: "long" (e.g., "January"), "short" ("Jan."), "numeric" ## ("1"), and "numeric-leading-zeros" ("01"). [ a:defaultValue = "long" ] @@ -660,13 +662,13 @@ div { 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. @@ -677,7 +679,7 @@ div { ## cs:text Rendering Element div { rendering-element.text = - + ## Use to call macros, render variables, terms, or verbatim text. element cs:text { text.attributes, @@ -690,17 +692,17 @@ div { } 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 } | ( @@ -713,7 +715,7 @@ div { ## 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 @@ -721,7 +723,7 @@ div { number.attributes = attribute variable { variables.numbers }, - + ## Number forms: "numeric" ("4"), "ordinal" ("4th"), "long-ordinal" ## ("fourth"), "roman" ("iv"). [ a:defaultValue = "numeric" ] @@ -732,7 +734,7 @@ div { ## 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.". @@ -744,7 +746,7 @@ div { 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" }?, @@ -758,7 +760,7 @@ div { ## 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 @@ -806,7 +808,7 @@ div { 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" ] @@ -815,101 +817,101 @@ div { }? 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 { "chicago" | "expanded" | "minimal" | "minimal-two" }? 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". @@ -917,17 +919,17 @@ div { 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 { @@ -935,41 +937,41 @@ div { }? 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" }? @@ -1018,17 +1020,17 @@ div { ## 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" }? @@ -1038,7 +1040,7 @@ div { ## 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+ } @@ -1047,20 +1049,20 @@ div { 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" }? @@ -1071,7 +1073,7 @@ div { ## cs:choose - Conditional Statements" div { rendering-element.choose = - + ## Use to conditionally render rendering elements. element cs:choose { choose.if, choose.else-if*, choose.else? } @@ -1083,27 +1085,27 @@ div { choose.else = element cs:else { rendering-element+ } condition = - + ## If used, the element content is only rendered if it disambiguates two ## otherwise identical citations. This attempt at disambiguation is only ## made after all other disambiguation methods have failed. [ a:defaultValue = "true" ] attribute disambiguate { "true" } - | + | ## Tests whether the given variables contain numeric text. attribute is-numeric { list { variables+ } } - | + | ## Tests whether the given date variables contain approximate dates. attribute is-uncertain-date { list { variables.dates+ } } - | + | ## Tests whether the locator matches the given locator types. attribute locator { list { (terms.locator.testable | "sub-verbo")+ } } - | + | ## Tests whether the cite position matches the given positions. attribute position { list { @@ -1114,12 +1116,12 @@ div { | "near-note")+ } } - | + | ## Tests whether the item matches the given types. attribute type { list { item-types+ } } - | + | ## Tests whether the default ("long") forms of the given variables ## contain non-empty values. attribute variable { @@ -1127,19 +1129,19 @@ div { } match = - + ## Set the testing logic. [ a:defaultValue = "all" ] attribute match { - + ## Element only tests "true" when all conditions test "true" for all ## given test values. "all" - | + | ## Element tests "true" when any condition tests "true" for any given ## test value. "any" - | + | ## Element only tests "true" when none of the conditions test "true" ## for any given test value. "none" @@ -1156,27 +1158,27 @@ div { 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" ] @@ -1191,25 +1193,25 @@ div { 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" - | + | ## Capitalizes the first character (other characters remain in ## their original case). "capitalize-first" @@ -1221,7 +1223,7 @@ div { ## Capitalizes the first character of every word (other characters ## remain in their original case). "capitalize-all" - | + | ## Renders text in title case. "title" }? From 2ee2aea57dad4a429686feb98bafac329aacdede Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Thu, 4 Jun 2020 08:24:37 -0400 Subject: [PATCH 19/61] Reformat csl.rnc using trang This updates to normalize the formatting and whitespace, using trang. --- schemas/styles/csl.rnc | 315 ++++++++++++++++++++--------------------- 1 file changed, 153 insertions(+), 162 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index 467cd768..a1744654 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -34,7 +34,7 @@ div { independent-style.style = element cs:style { - + ## Select whether citations appear in-text or as notes. attribute class { "in-text" | "note" }, style.default-locale, @@ -50,9 +50,7 @@ div { dependent-style.style = element cs:style { - style.default-locale, - version, - dependent-style.style.info + style.default-locale, version, dependent-style.style.info } locale-file.locale = @@ -79,7 +77,7 @@ div { ## cs:info - Style and Locale File Metadata div { - + ## Metadata for independent styles. independent-style.style.info = element cs:info { @@ -98,7 +96,7 @@ div { & info.title-short? & info.updated } - + ## Metadata for dependent styles. dependent-style.style.info = element cs:info { @@ -117,24 +115,20 @@ div { & 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). @@ -151,37 +145,35 @@ div { 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" }, @@ -191,17 +183,17 @@ div { 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" }, @@ -209,7 +201,7 @@ div { } info.published = - + ## Specify when the style was initially created or made available. element cs:published { xsd:dateTime } @@ -224,12 +216,12 @@ div { 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 } @@ -243,10 +235,10 @@ div { ## 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 }?, @@ -257,18 +249,18 @@ div { ## 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" ] @@ -299,13 +291,13 @@ div { } 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" } @@ -316,7 +308,7 @@ div { } 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 = @@ -340,18 +332,18 @@ div { | (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 } } @@ -360,7 +352,7 @@ div { ## cs:macro div { style.macro = - + ## Use to create collections of (reusable) formatting instructions. element cs:macro { attribute name { xsd:NMTOKEN }, @@ -382,12 +374,11 @@ div { ## cs:citation and cs:bibliography div { style.citation = - + ## Use to describe the formatting of citations. element cs:citation { citation.options, sort?, citation.layout } - style.intext = - + ## Defines the author-only rendering for assembly of a textual citations ## (for example, "Doe [3]" or "Doe (2018)"), where the output expectations ## for in-text authors are different than the default citation rendering; @@ -395,7 +386,7 @@ div { element cs:intext { citation.options, sort?, citation.layout } style.bibliography = - + ## Use to describe the formatting of the bibliography. element cs:bibliography { bibliography.options, sort?, bibliography.layout @@ -425,7 +416,7 @@ div { list { variables.names+ } }, affixes, - + ## Specify the delimiter for name lists of name variables rendered by ## the same cs:names element. delimiter, @@ -435,7 +426,7 @@ div { 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 @@ -443,7 +434,7 @@ div { [ 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, @@ -452,109 +443,109 @@ div { } name.attributes = - + ## Use to separate the second-to-last and last name of a name list by ## the "and" term. attribute and { - + ## Use the "and" term "long" form (e.g., "Doe, Johnson and Smith"). "long" - | + | ## Use the "and" term "symbol" form (e.g., "Doe, Johnson & Smith"). "symbol" - | + | ## Use the "and" term "short" form. Not common in English, but is seen in other languages. ## In German, for example: "Doe, Johnson u. Smith, where "u." is short for "und." "short" }?, - + ## 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" }, @@ -564,10 +555,10 @@ div { } 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" }?, @@ -582,11 +573,11 @@ div { } 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 } } @@ -601,13 +592,13 @@ div { ## 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" }?, @@ -621,7 +612,7 @@ div { } 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 @@ -632,7 +623,7 @@ div { } 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 { @@ -641,7 +632,7 @@ div { day = attribute name { "day" }, - + ## Day forms: "numeric" ("5"), "numeric-leading-zeros" ("05"), "ordinal" ## ("5th"). [ a:defaultValue = "numeric" ] @@ -650,7 +641,7 @@ div { month = attribute name { "month" }, - + ## Months forms: "long" (e.g., "January"), "short" ("Jan."), "numeric" ## ("1"), and "numeric-leading-zeros" ("01"). [ a:defaultValue = "long" ] @@ -662,13 +653,13 @@ div { 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. @@ -679,7 +670,7 @@ div { ## cs:text Rendering Element div { rendering-element.text = - + ## Use to call macros, render variables, terms, or verbatim text. element cs:text { text.attributes, @@ -692,17 +683,17 @@ div { } 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 } | ( @@ -715,7 +706,7 @@ div { ## 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 @@ -723,7 +714,7 @@ div { number.attributes = attribute variable { variables.numbers }, - + ## Number forms: "numeric" ("4"), "ordinal" ("4th"), "long-ordinal" ## ("fourth"), "roman" ("iv"). [ a:defaultValue = "numeric" ] @@ -734,7 +725,7 @@ div { ## 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.". @@ -746,7 +737,7 @@ div { 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" }?, @@ -760,7 +751,7 @@ div { ## 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 @@ -808,7 +799,7 @@ div { 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" ] @@ -817,101 +808,101 @@ div { }? 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 { "chicago" | "expanded" | "minimal" | "minimal-two" }? 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". @@ -919,17 +910,17 @@ div { 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 { @@ -937,41 +928,41 @@ div { }? 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" }? @@ -1020,17 +1011,17 @@ div { ## 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" }? @@ -1040,7 +1031,7 @@ div { ## 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+ } @@ -1049,20 +1040,20 @@ div { 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" }? @@ -1073,7 +1064,7 @@ div { ## cs:choose - Conditional Statements" div { rendering-element.choose = - + ## Use to conditionally render rendering elements. element cs:choose { choose.if, choose.else-if*, choose.else? } @@ -1085,27 +1076,27 @@ div { choose.else = element cs:else { rendering-element+ } condition = - + ## If used, the element content is only rendered if it disambiguates two ## otherwise identical citations. This attempt at disambiguation is only ## made after all other disambiguation methods have failed. [ a:defaultValue = "true" ] attribute disambiguate { "true" } - | + | ## Tests whether the given variables contain numeric text. attribute is-numeric { list { variables+ } } - | + | ## Tests whether the given date variables contain approximate dates. attribute is-uncertain-date { list { variables.dates+ } } - | + | ## Tests whether the locator matches the given locator types. attribute locator { list { (terms.locator.testable | "sub-verbo")+ } } - | + | ## Tests whether the cite position matches the given positions. attribute position { list { @@ -1116,12 +1107,12 @@ div { | "near-note")+ } } - | + | ## Tests whether the item matches the given types. attribute type { list { item-types+ } } - | + | ## Tests whether the default ("long") forms of the given variables ## contain non-empty values. attribute variable { @@ -1129,19 +1120,19 @@ div { } match = - + ## Set the testing logic. [ a:defaultValue = "all" ] attribute match { - + ## Element only tests "true" when all conditions test "true" for all ## given test values. "all" - | + | ## Element tests "true" when any condition tests "true" for any given ## test value. "any" - | + | ## Element only tests "true" when none of the conditions test "true" ## for any given test value. "none" @@ -1158,27 +1149,27 @@ div { 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" ] @@ -1193,25 +1184,25 @@ div { 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" - | + | ## Capitalizes the first character (other characters remain in ## their original case). "capitalize-first" @@ -1223,7 +1214,7 @@ div { ## Capitalizes the first character of every word (other characters ## remain in their original case). "capitalize-all" - | + | ## Renders text in title case. "title" }? From 3192d5553fe5a5247929b874f7cbef58fb8f63fb Mon Sep 17 00:00:00 2001 From: Denis Maier Date: Sun, 14 Jun 2020 15:22:03 +0200 Subject: [PATCH 20/61] Split title -> Title-main/title-sub (#203) This adds distinct variables for different parts of a title, and attributes that instruct processors how these variables can be derived from regular title variables, how titles should be re-assembled from these derived variables, and which delimiters to use for that. It also adds a new option "capitalize-subtitle" to text-case. Closes citation-style-language/csl-evolution#31 --- schemas/styles/csl-variables.rnc | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/schemas/styles/csl-variables.rnc b/schemas/styles/csl-variables.rnc index cf0f8fd8..4a3c2d5e 100644 --- a/schemas/styles/csl-variables.rnc +++ b/schemas/styles/csl-variables.rnc @@ -88,14 +88,18 @@ div { | "reviewed-title-main" | "reviewed-title-sub" | "reviewed-title-short" - | "volume-title" - | "volume-title-main" - | "volume-title-sub" - | "volume-title-short" | "title" | "title-main" | "title-sub" | "title-short" + | "translated-title" + | "translated-title-main" + | "translated-title-sub" + | "translated-title-short" + | "volume-title" + | "volume-title-main" + | "volume-title-sub" + | "volume-title-short" ## String variables variables.strings = @@ -125,23 +129,15 @@ div { | "note" | "original-publisher" | "original-publisher-place" - | "original-title" - | "part-title" | "PMCID" | "PMID" | "publisher" | "publisher-place" | "references" | "reviewed-genre" - | "reviewed-title" | "scale" | "source" | "status" - | "title" - | "title-short" - | "translated-title" - | "translated-title-short" | "URL" - | "volume-title" | "year-suffix" } From a91d6f2d91e908240adb22b32280afeeeba2486b Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Mon, 22 Jun 2020 06:45:15 -0400 Subject: [PATCH 21/61] Add new cs:conditions element to choose (#260) This adds a modified version of the CSL-M conditions element and condition child as an option to configure more complex conditional rules. Also splits off the cs:choose section into a separate file. Closes #255 --- schemas/styles/csl-choose.rnc | 85 +++++++++++++++++++++++++++++++++++ schemas/styles/csl.rnc | 80 +-------------------------------- 2 files changed, 86 insertions(+), 79 deletions(-) create mode 100644 schemas/styles/csl-choose.rnc diff --git a/schemas/styles/csl-choose.rnc b/schemas/styles/csl-choose.rnc new file mode 100644 index 00000000..1fdbb562 --- /dev/null +++ b/schemas/styles/csl-choose.rnc @@ -0,0 +1,85 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" +namespace cs = "http://purl.org/net/xbiblio/csl" + + +## cs:choose - Conditional Statements" +div { + rendering-element.choose = + + ## Use to conditionally render rendering elements. + element cs:choose { choose.if, choose.else-if*, choose.else? } + + ## When specifying conditions, we allow either the attribute syntax or the element-based one. + choose.condition = + condition.atts + | element cs:conditions { match, condition.elem+ } + choose.if = element cs:if { choose.condition, rendering-element* } + choose.else-if = + element cs:else-if { choose.condition+, rendering-element* } + choose.else = element cs:else { rendering-element+ } + + ## This element allows for more complex conditional logic; for + ## example, if you need to specify mixed "match" rules. + condition.elem = element cs:condition { match?, condition.atts } + condition.atts = + + ## If used, the element content is only rendered if it disambiguates two + ## otherwise identical citations. This attempt at disambiguation is only + ## made after all other disambiguation methods have failed. + [ a:defaultValue = "true" ] attribute disambiguate { "true" } + | + ## Tests whether the given variables contain numeric text. + attribute is-numeric { + list { variables+ } + } + | + ## Tests whether the given date variables contain approximate dates. + attribute is-uncertain-date { + list { variables.dates+ } + } + | + ## Tests whether the locator matches the given locator types. + attribute locator { + list { (terms.locator.testable | "sub-verbo")+ } + } + | + ## Tests whether the cite position matches the given positions. + attribute position { + list { + ("first" + | "subsequent" + | "ibid" + | "ibid-with-locator" + | "near-note")+ + } + } + | + ## Tests whether the item matches the given types. + attribute type { + list { item-types+ } + } + | + ## Tests whether the default ("long") forms of the given variables + ## contain non-empty values. + attribute variable { + list { variables+ } + } + match = + + ## Set the testing logic. + [ a:defaultValue = "all" ] + attribute match { + + ## Element only tests "true" when all conditions test "true" for all + ## given test values. + "all" + | + ## Element tests "true" when any condition tests "true" for any given + ## test value. + "any" + | + ## Element only tests "true" when none of the conditions test "true" + ## for any given test value. + "none" + }? +} diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index a1744654..618fcdc5 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -21,6 +21,7 @@ dc:description [ ] ## Subparts of the CSL schema +include "csl-choose.rnc" include "csl-terms.rnc" include "csl-types.rnc" include "csl-variables.rnc" @@ -1061,85 +1062,6 @@ div { } # ============================================================================== -## cs:choose - Conditional Statements" -div { - rendering-element.choose = - - ## Use to conditionally render rendering elements. - element cs:choose { choose.if, choose.else-if*, choose.else? } - - choose.if = element cs:if { condition+, match, rendering-element* } - - choose.else-if = - element cs:else-if { condition+, match, rendering-element* } - - choose.else = element cs:else { rendering-element+ } - - condition = - - ## If used, the element content is only rendered if it disambiguates two - ## otherwise identical citations. This attempt at disambiguation is only - ## made after all other disambiguation methods have failed. - [ a:defaultValue = "true" ] attribute disambiguate { "true" } - | - ## Tests whether the given variables contain numeric text. - attribute is-numeric { - list { variables+ } - } - | - ## Tests whether the given date variables contain approximate dates. - attribute is-uncertain-date { - list { variables.dates+ } - } - | - ## Tests whether the locator matches the given locator types. - attribute locator { - list { (terms.locator.testable | "sub-verbo")+ } - } - | - ## Tests whether the cite position matches the given positions. - attribute position { - list { - ("first" - | "subsequent" - | "ibid" - | "ibid-with-locator" - | "near-note")+ - } - } - | - ## Tests whether the item matches the given types. - attribute type { - list { item-types+ } - } - | - ## Tests whether the default ("long") forms of the given variables - ## contain non-empty values. - attribute variable { - list { variables+ } - } - - match = - - ## Set the testing logic. - [ a:defaultValue = "all" ] - attribute match { - - ## Element only tests "true" when all conditions test "true" for all - ## given test values. - "all" - | - ## Element tests "true" when any condition tests "true" for any given - ## test value. - "any" - | - ## Element only tests "true" when none of the conditions test "true" - ## for any given test value. - "none" - }? -} -# ============================================================================== - ## Formatting attributes. div { affixes = From 15201098f168166ab4e2e2e8cc5393d62b70d55f Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Mon, 22 Jun 2020 18:19:06 -0400 Subject: [PATCH 22/61] Fix bugs with undefined, duplicate patterns --- schemas/styles/csl.rnc | 80 +----------------------------------------- 1 file changed, 1 insertion(+), 79 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index 618fcdc5..06d18e74 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -32,7 +32,6 @@ include "csl-categories.rnc" div { start = independent-style.style | dependent-style.style | locale-file.locale - independent-style.style = element cs:style { @@ -48,27 +47,14 @@ div { & style.intext? & style.bibliography?) } - dependent-style.style = element cs:style { style.default-locale, version, dependent-style.style.info } - - 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) - } - style.default-locale = - + ## Set a default style locale. attribute default-locale { xsd:language }? - version = ## Indicate CSL version compatibility. @@ -127,7 +113,6 @@ div { 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" @@ -137,26 +122,22 @@ div { 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. @@ -180,7 +161,6 @@ div { }, info-text } - dependent-style.info.link = element cs:link { attribute href { xsd:anyURI }, @@ -200,33 +180,26 @@ div { }, 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 @@ -267,7 +240,6 @@ div { [ a:defaultValue = "false" ] attribute punctuation-in-quote { xsd:boolean }? } - locale-file.locale = element cs:locale { @@ -277,11 +249,6 @@ div { locale-file.locale.info?, (locale.style-options & locale.date+ & locale.terms) } - - style.default-locale = - - ## Set a default style locale. - attribute default-locale { xsd:language }? locale.date = element cs:date { date.form, @@ -290,7 +257,6 @@ div { text-case, locale.date.date-part+ } - date.form = ## Select the localized date format ("text" or "numeric"). @@ -302,12 +268,10 @@ div { ## 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 @@ -317,7 +281,6 @@ div { term.attributes, (text | (term.single, term.multiple)) } - term.attributes = (attribute name { terms }, [ a:defaultValue = "long" ] attribute form { term.form }?) @@ -342,7 +305,6 @@ div { ## Singular version of the term. element cs:single { text } - term.multiple = ## Plural version of the term. @@ -359,13 +321,11 @@ div { attribute name { xsd:NMTOKEN }, rendering-element+ } - rendering-element = rendering-element.names | rendering-element.date | rendering-element.label | rendering-element.text - | rendering-element.title | rendering-element.number | rendering-element.choose | rendering-element.group @@ -385,19 +345,16 @@ div { ## for in-text authors are different than the default citation rendering; ## for example, in APA, or numeric styles. element cs:intext { 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+ } } @@ -411,7 +368,6 @@ div { ((names.name?, names.et-al?) & names.label?), names.substitute? } - names.attributes = attribute variable { list { variables.names+ } @@ -423,7 +379,6 @@ div { delimiter, display, font-formatting - names.name = element cs:name { name.attributes, @@ -442,7 +397,6 @@ div { font-formatting, name.name-part* } - name.attributes = ## Use to separate the second-to-last and last name of a name list by @@ -544,7 +498,6 @@ div { ## 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"). @@ -572,7 +525,6 @@ div { [ a:defaultValue = "long" ] attribute form { term.form }?, label.attributes-shared } - names.substitute = ## Specify substitution options when the name variables selected on the @@ -611,7 +563,6 @@ div { font-formatting, text-case } - rendering-element.date.date-part.localized = ## Specify overriding formatting for localized dates (affixes @@ -622,7 +573,6 @@ div { 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 @@ -630,7 +580,6 @@ div { element cs:date-part { affixes, font-formatting, text-case, (day | month | year) } - day = attribute name { "day" }, @@ -639,7 +588,6 @@ div { [ a:defaultValue = "numeric" ] attribute form { "numeric" | "numeric-leading-zeros" | "ordinal" }?, range-delimiter - month = attribute name { "month" }, @@ -651,14 +599,12 @@ div { }?, 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 @@ -682,7 +628,6 @@ div { strip-periods, text-case } - text.attributes = ## Select a macro. @@ -712,7 +657,6 @@ div { element cs:number { number.attributes, affixes, display, font-formatting, text-case } - number.attributes = attribute variable { variables.numbers }, @@ -731,12 +675,10 @@ div { ## 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. @@ -766,7 +708,6 @@ div { font-formatting, rendering-element+ } - group.attributes = notAllowed? } # ============================================================================== @@ -780,7 +721,6 @@ div { title-inheritable-options, names-inheritable-options, name-inheritable-options - citation.options = citation.cite-group-delimiter, citation.collapse-options, @@ -789,7 +729,6 @@ div { title-inheritable-options, names-inheritable-options, name-inheritable-options - bibliography.options = bibliography.hanging-indent, bibliography.line-formatting-options, @@ -798,7 +737,6 @@ div { title-inheritable-options, names-inheritable-options, name-inheritable-options - style.demote-non-dropping-particle = ## Specify whether the non-dropping particle is demoted in inverted @@ -807,27 +745,23 @@ div { 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 { "chicago" | "expanded" | "minimal" | "minimal-two" }? - 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. @@ -857,7 +791,6 @@ div { ## 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 @@ -901,7 +834,6 @@ div { ## expanded. "by-cite" }? - citation.near-note-distance = ## Set the number of preceding notes (footnotes or endnotes) within @@ -909,13 +841,11 @@ div { ## 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. @@ -927,7 +857,6 @@ div { attribute line-spacing { xsd:integer { minExclusive = "0" } }? - bibliography.second-field-align = ## Use to align any subsequent lines of bibliographic entries with the @@ -941,7 +870,6 @@ div { ## lines of text with the margin. "margin" }? - bibliography.subsequent-author-substitute-options = ## Substitute names that repeat in subsequent bibliographic entries by @@ -1036,7 +964,6 @@ div { ## 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 } @@ -1067,9 +994,7 @@ 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. @@ -1104,18 +1029,15 @@ div { 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 { From 670e5bf75825a2baa86fb0a158eca6f2a2859315 Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Mon, 22 Jun 2020 18:54:04 -0400 Subject: [PATCH 23/61] Fix bug on new cs:choose patterns --- schemas/styles/csl-choose.rnc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schemas/styles/csl-choose.rnc b/schemas/styles/csl-choose.rnc index 1fdbb562..2291c37b 100644 --- a/schemas/styles/csl-choose.rnc +++ b/schemas/styles/csl-choose.rnc @@ -11,11 +11,11 @@ div { ## When specifying conditions, we allow either the attribute syntax or the element-based one. choose.condition = - condition.atts + (condition.atts, match?) | element cs:conditions { match, condition.elem+ } choose.if = element cs:if { choose.condition, rendering-element* } choose.else-if = - element cs:else-if { choose.condition+, rendering-element* } + element cs:else-if { choose.condition, rendering-element* } choose.else = element cs:else { rendering-element+ } ## This element allows for more complex conditional logic; for From 59cd36fbd568609a40785882a0a3e0de4f85a1d1 Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Wed, 24 Jun 2020 17:10:13 -0400 Subject: [PATCH 24/61] Add sub/main form values to cs:text (#271) This uses @form to allow specification of formatting for split title parts; like subtitles. Also, removes -sub/-main and -short title variables, which are no longer needed. --- schemas/styles/csl-variables.rnc | 34 +++++++------------------------- schemas/styles/csl.rnc | 20 ++++++++++++------- 2 files changed, 20 insertions(+), 34 deletions(-) diff --git a/schemas/styles/csl-variables.rnc b/schemas/styles/csl-variables.rnc index 4a3c2d5e..a30921bb 100644 --- a/schemas/styles/csl-variables.rnc +++ b/schemas/styles/csl-variables.rnc @@ -3,14 +3,14 @@ namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" ## Variables div { - + ## All variables variables = variables.dates | variables.names | variables.standard - + ## Standard variables variables.standard = variables.numbers | variables.strings | variables.titles - + ## Date variables variables.dates = "accessed" @@ -19,7 +19,7 @@ div { | "issued" | "original-date" | "submitted" - + ## Name variables variables.names = "author" @@ -69,38 +69,18 @@ div { | "supplement" | "version" | "volume" - + ## Title variables variables.titles = "collection-title" - | "collection-title-main" - | "collection-title-sub" - | "collection-title-short" | "container-title" - | "container-title-main" - | "container-title-sub" - | "container-title-short" | "original-title" - | "original-title-main" - | "original-title-sub" - | "original-title-short" + | "part-title" | "reviewed-title" - | "reviewed-title-main" - | "reviewed-title-sub" - | "reviewed-title-short" | "title" - | "title-main" - | "title-sub" - | "title-short" | "translated-title" - | "translated-title-main" - | "translated-title-sub" - | "translated-title-short" | "volume-title" - | "volume-title-main" - | "volume-title-sub" - | "volume-title-short" - + ## String variables variables.strings = "abstract" diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index 06d18e74..9b1278ef 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -125,7 +125,7 @@ div { 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 + ## is valid, but new styles should use a UUID to ensure stability ## and uniqueness. element cs:id { xsd:anyURI } info.issn = @@ -321,6 +321,11 @@ div { attribute name { xsd:NMTOKEN }, rendering-element+ } +} +# ============================================================================== + +## Rendering Elements +div { rendering-element = rendering-element.names | rendering-element.date @@ -642,10 +647,11 @@ div { | ## Specify verbatim text. attribute value { text } - | ( - ## Select a variable. - attribute variable { variables.standard }, - [ a:defaultValue = "long" ] attribute form { "short" | "long" }?) + | ((attribute variable { variables.numbers | variables.strings }, + [ a:defaultValue = "long" ] attribute form { "short" | "long" }) + | (attribute variable { variables.titles }, + [ a:defaultValue = "long" ] + attribute form { "short" | "long" | "sub" | "main" })?) } # ============================================================================== @@ -910,7 +916,7 @@ div { [ a:defaultValue = "simple" ] attribute title-split { - ## Matches "."", ":", "::", "!", "?" + ## Matches "."", ":", "::", "!", "?" "simple" | ## Matches the values for "simple" plus ";" @@ -919,7 +925,7 @@ div { ## Matches the values for "simple" plus "—" and ";" "full" | - ## Matches the values for "simple" plus ";"" + ## Matches the values for "simple" plus ";"" ## and "[;,] or[,:]" (see CMoS 14.91), e.g. "Moby-Dick; or, The Whale" "chicago" }?, From 061466a2eb9ac159875aefbfce7bb7d018848b15 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Wed, 24 Jun 2020 18:17:07 -0400 Subject: [PATCH 25/61] Add editor-translator as testable variable (#273) Add editor-translator to the RNC schema to make it a testable variable. This makes it possible to modify the formatting of editor and translator depending on if they are the same person or not. The variable itself is still populated by the processor collapsing editor and translator. This will require a minor update to processor code. They already have the editortranslator collapsing code; but they would likely need a small modification to call it during and if test. Given that, probably v1.1, rather than 1.0.2? Fixes part of # citation-style-language/csl-evolution#7 --- schemas/styles/csl-variables.rnc | 1 + 1 file changed, 1 insertion(+) diff --git a/schemas/styles/csl-variables.rnc b/schemas/styles/csl-variables.rnc index a30921bb..56fe6708 100644 --- a/schemas/styles/csl-variables.rnc +++ b/schemas/styles/csl-variables.rnc @@ -33,6 +33,7 @@ div { | "curator" | "director" | "editor" + | "editor-translator" | "editorial-director" | "executive-producer" | "guest" From fde9bd61264c9bfab71f95dba4dc4ddbf8158561 Mon Sep 17 00:00:00 2001 From: Daniel Himmelstein Date: Fri, 26 Jun 2020 12:25:27 -0400 Subject: [PATCH 26/61] input: add custom field to json data (#280) closes https://github.com/citation-style-language/schema/issues/277 --- schemas/input/csl-data.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/schemas/input/csl-data.json b/schemas/input/csl-data.json index 40473cd8..7e4801fa 100644 --- a/schemas/input/csl-data.json +++ b/schemas/input/csl-data.json @@ -441,6 +441,15 @@ }, "year-suffix": { "type": "string" + }, + "custom": { + "title": "Custom key-value pairs.", + "type": "object", + "description": "Used to store additional information that does not have a designated CSL JSON field. The note field can also store additional information, but custom is preferred for storing key-value pairs.", + "examples" : [ + {"short_id": "xyz", "other-ids": ["alternative-id"]}, + {"metadata-double-checked": true} + ] } }, "required": ["type", "id"], From a67b6334205af1787a44230ebd0621fe5c0a1698 Mon Sep 17 00:00:00 2001 From: Denis Maier Date: Tue, 30 Jun 2020 15:46:48 +0200 Subject: [PATCH 27/61] Add act and scene locators (#290) Closes #288 --- schemas/styles/csl-terms.rnc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/schemas/styles/csl-terms.rnc b/schemas/styles/csl-terms.rnc index 41eaa0c2..e34c557f 100644 --- a/schemas/styles/csl-terms.rnc +++ b/schemas/styles/csl-terms.rnc @@ -134,7 +134,8 @@ div { ## Locator terms that can be tested with the "locator" conditional ## ("sub verbo" can be tested with "sub-verbo") terms.locator.testable = - "appendix" + "act" + | "appendix" | "article-locator" | "book" | "canon" @@ -149,6 +150,7 @@ div { | "opus" | "paragraph" | "rule" + | "scene" | "table" | "timestamp" | "title" From c99350087a4ba4c162262b616dd87ffcbc1f8e40 Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Tue, 30 Jun 2020 10:46:40 -0400 Subject: [PATCH 28/61] input: Add EDTF as an option for date representation (#284) As part of #278, and to harmonize the JSON and YAML representations around a much more concise and expressive date format, this adds a an option to use EDTF; either as a preferred string on any date, or as an "edtf" string property on the more verbose alternative object representation. While EDTF was originally an initiative of the US Library of Congress, ISO adopted it as part of 8601-2 in 2019. Note: The current regular expression pattern only checks for valid characters. --- schemas/input/csl-data.json | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/schemas/input/csl-data.json b/schemas/input/csl-data.json index 7e4801fa..b3960517 100644 --- a/schemas/input/csl-data.json +++ b/schemas/input/csl-data.json @@ -446,9 +446,14 @@ "title": "Custom key-value pairs.", "type": "object", "description": "Used to store additional information that does not have a designated CSL JSON field. The note field can also store additional information, but custom is preferred for storing key-value pairs.", - "examples" : [ - {"short_id": "xyz", "other-ids": ["alternative-id"]}, - {"metadata-double-checked": true} + "examples": [ + { + "short_id": "xyz", + "other-ids": ["alternative-id"] + }, + { + "metadata-double-checked": true + } ] } }, @@ -492,8 +497,19 @@ } ] }, + "edtf-datatype": { + "title": "EDTF datatype pattern", + "description": "CSL input supports EDTF, validated against this regular expression.", + "type": "string", + "pattern": "^[0-9-%~X?.\/]{4,}$" + }, "date-variable": { + "title": "Date content model.", + "description": "The CSL input model supports two different date representations: an EDTF string (preferred), and a more structured alternative.", "anyOf": [ + { + "$ref": "#/definitions/edtf-datatype" + }, { "properties": { "date-parts": { @@ -520,6 +536,9 @@ }, "raw": { "type": "string" + }, + "edtf": { + "$ref": "#/definitions/edtf-datatype" } }, "additionalProperties": false From 3d009034038fbef48a0aaa41f1be9c0103b466db Mon Sep 17 00:00:00 2001 From: Denis Maier Date: Tue, 30 Jun 2020 18:58:17 +0200 Subject: [PATCH 29/61] Add locator term sub-verbo, remove legacy workaround (#292) This changes sub verbo to sub-verbo so this will be testable as is. --- schemas/styles/csl-choose.rnc | 2 +- schemas/styles/csl-terms.rnc | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/schemas/styles/csl-choose.rnc b/schemas/styles/csl-choose.rnc index 2291c37b..c85d7780 100644 --- a/schemas/styles/csl-choose.rnc +++ b/schemas/styles/csl-choose.rnc @@ -40,7 +40,7 @@ div { | ## Tests whether the locator matches the given locator types. attribute locator { - list { (terms.locator.testable | "sub-verbo")+ } + list { (terms.locator)+ } } | ## Tests whether the cite position matches the given positions. diff --git a/schemas/styles/csl-terms.rnc b/schemas/styles/csl-terms.rnc index e34c557f..9d92f632 100644 --- a/schemas/styles/csl-terms.rnc +++ b/schemas/styles/csl-terms.rnc @@ -125,15 +125,6 @@ div { ## Locators terms.locator = - terms.locator.testable - | - ## "sub verbo" is recognized as "sub" & "verbo" in attribute lists; term - ## should be renamed to "sub-verbo" - "sub verbo" - - ## Locator terms that can be tested with the "locator" conditional - ## ("sub verbo" can be tested with "sub-verbo") - terms.locator.testable = "act" | "appendix" | "article-locator" @@ -151,6 +142,7 @@ div { | "paragraph" | "rule" | "scene" + | "sub-verbo" | "table" | "timestamp" | "title" From 9e7624bc74b9da880dcffed987a2a128ab6680ff Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Wed, 1 Jul 2020 07:52:17 -0400 Subject: [PATCH 30/61] Add henceforth term (#296) Used for styles that switch to an abbreviated `citation-label` format for subsequent citations. Long and short forms might be localized as "henceforth cited as" and "henceforth" respectively. Closes https://github.com/citation-style-language/csl-evolution/issues/37 --- schemas/styles/csl-terms.rnc | 1 + 1 file changed, 1 insertion(+) diff --git a/schemas/styles/csl-terms.rnc b/schemas/styles/csl-terms.rnc index 9d92f632..694db841 100644 --- a/schemas/styles/csl-terms.rnc +++ b/schemas/styles/csl-terms.rnc @@ -34,6 +34,7 @@ div { | "film" | "forthcoming" | "from" + | "henceforth" | "ibid" | "in" | "in press" From feb9d1fea07aa7a1d3c09c257d259d09c57f913e Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Fri, 3 Jul 2020 19:39:04 -0400 Subject: [PATCH 31/61] Remove field category terms (#298) Closes https://github.com/citation-style-language/schema/issues/100 --- schemas/styles/csl-terms.rnc | 3 --- 1 file changed, 3 deletions(-) diff --git a/schemas/styles/csl-terms.rnc b/schemas/styles/csl-terms.rnc index 694db841..37cfad6f 100644 --- a/schemas/styles/csl-terms.rnc +++ b/schemas/styles/csl-terms.rnc @@ -81,9 +81,6 @@ div { | "season-02" | "season-03" | "season-04" - | - ## (legacy; remove in CSL 1.1) - category.field ## Terms to which a gender may be assigned terms.gender-assignable = From 7f3e839be83b32659e30e16a75d10c064deff693 Mon Sep 17 00:00:00 2001 From: abdealikhurrum Date: Fri, 17 Nov 2017 21:06:16 -0600 Subject: [PATCH 32/61] Added comma and semicolon Adding these to Punctuation will enable using different punctuation marks as default in styles for languages like Arabic and Persian. Without the different commas and semicolons, citations are difficult to read and directionality is impacted, adding unneeded complexity in the final editing process. --- schemas/styles/csl-terms.rnc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/schemas/styles/csl-terms.rnc b/schemas/styles/csl-terms.rnc index 37cfad6f..942b7379 100644 --- a/schemas/styles/csl-terms.rnc +++ b/schemas/styles/csl-terms.rnc @@ -75,6 +75,8 @@ div { | "open-inner-quote" | "close-inner-quote" | "page-range-delimiter" + | "comma" + | "semicolon" | ## Seasons "season-01" From 9fb4a3c4e7699905475eb78f264f91dfba2ce350 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Mon, 6 Jul 2020 15:41:02 -0400 Subject: [PATCH 33/61] Add colon term --- schemas/styles/csl-terms.rnc | 1 + 1 file changed, 1 insertion(+) diff --git a/schemas/styles/csl-terms.rnc b/schemas/styles/csl-terms.rnc index 942b7379..97cb2f27 100644 --- a/schemas/styles/csl-terms.rnc +++ b/schemas/styles/csl-terms.rnc @@ -75,6 +75,7 @@ div { | "open-inner-quote" | "close-inner-quote" | "page-range-delimiter" + | "colon" | "comma" | "semicolon" | From ef994afab4c98bb0f993cbc3da70ed93149a1848 Mon Sep 17 00:00:00 2001 From: Denis Maier Date: Tue, 7 Jul 2020 14:32:01 +0200 Subject: [PATCH 34/61] add new page-range formats (#302) * add new page-range formats * change order of range formats Co-authored-by: denismaier --- schemas/styles/csl.rnc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index 9b1278ef..451800ac 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -761,7 +761,7 @@ div { ## Reformat page ranges in the "page" variable. attribute page-range-format { - "chicago" | "expanded" | "minimal" | "minimal-two" + "expanded" | "minimal" | "minimal-two" | "minimal-oup" | "chicago" | "mhra" }? citation.cite-group-delimiter = From 79b68e29aa36065b287f37451f3ce2361b5c5b49 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Wed, 8 Jul 2020 15:20:48 -0400 Subject: [PATCH 35/61] trang v1.1 --- schemas/styles/csl-choose.rnc | 2 +- schemas/styles/csl-variables.rnc | 12 ++++++------ schemas/styles/csl.rnc | 7 ++++++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/schemas/styles/csl-choose.rnc b/schemas/styles/csl-choose.rnc index c85d7780..e552f2b4 100644 --- a/schemas/styles/csl-choose.rnc +++ b/schemas/styles/csl-choose.rnc @@ -40,7 +40,7 @@ div { | ## Tests whether the locator matches the given locator types. attribute locator { - list { (terms.locator)+ } + list { terms.locator+ } } | ## Tests whether the cite position matches the given positions. diff --git a/schemas/styles/csl-variables.rnc b/schemas/styles/csl-variables.rnc index 56fe6708..6b73d671 100644 --- a/schemas/styles/csl-variables.rnc +++ b/schemas/styles/csl-variables.rnc @@ -3,14 +3,14 @@ namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" ## Variables div { - + ## All variables variables = variables.dates | variables.names | variables.standard - + ## Standard variables variables.standard = variables.numbers | variables.strings | variables.titles - + ## Date variables variables.dates = "accessed" @@ -19,7 +19,7 @@ div { | "issued" | "original-date" | "submitted" - + ## Name variables variables.names = "author" @@ -70,7 +70,7 @@ div { | "supplement" | "version" | "volume" - + ## Title variables variables.titles = "collection-title" @@ -81,7 +81,7 @@ div { | "title" | "translated-title" | "volume-title" - + ## String variables variables.strings = "abstract" diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index 451800ac..fd68f3a5 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -761,7 +761,12 @@ div { ## Reformat page ranges in the "page" variable. attribute page-range-format { - "expanded" | "minimal" | "minimal-two" | "minimal-oup" | "chicago" | "mhra" + "expanded" + | "minimal" + | "minimal-two" + | "minimal-oup" + | "chicago" + | "mhra" }? citation.cite-group-delimiter = From 41cfa28fc5c1c3d85a6a39c55b430e7ab2a34271 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Wed, 8 Jul 2020 16:43:09 -0400 Subject: [PATCH 36/61] Trang reconcile --- schemas/styles/csl.rnc | 1 - 1 file changed, 1 deletion(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index fd68f3a5..e028de49 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -512,7 +512,6 @@ div { font-formatting, text-case } - names.et-al = ## Specify the term used for et-al abbreviation and its formatting. From 193288b880cd7bec92365eb9812c2c2f5c163401 Mon Sep 17 00:00:00 2001 From: Philipp Zumstein Date: Sun, 12 Jul 2020 12:38:00 +0200 Subject: [PATCH 37/61] Update link to Jing in README.md (#311) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bd528c7d..c215df2c 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ CSL style and locale files should be validated against `csl.rnc`, which incorporates the content of the other files. The CSL schema contains several [Schematron](http://www.schematron.com/) rules to make sure all macros called in a CSL style are actually defined. -Since the popular [Jing](https://code.google.com/p/jing-trang/) XML validator currently ignores embedded Schematron rules, +Since the popular [Jing](https://github.com/relaxng/jing-trang) XML validator currently ignores embedded Schematron rules, we also provide the `csl.sch` Schematron schema, which contains the Schematron rules extracted from the CSL schema. Jing users can use `csl.sch` to perform a secondary validation of CSL styles. From eb7ad5e67af8350991ee77a05fdacbe77ade34bf Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Sun, 12 Jul 2020 07:21:31 -0400 Subject: [PATCH 38/61] docs: move Mendeley JSON notes from README to wiki --- README.md | 83 +------------------------------------------------------ 1 file changed, 1 insertion(+), 82 deletions(-) diff --git a/README.md b/README.md index c215df2c..7e973897 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ and currently consists of the following files: To render citations and bibliographies, CSL processors not only require CSL style and locale files, but also bibliographic metadata. The citeproc-js CSL processor [introduced](http://gsl-nagoya-u.net/http/pub/citeproc-doc.html#data-input) a JSON format to store such metadata, and this format has since been adopted by various other software products. -The format, also known as "citeproc-JSON", has been codified in the CSL-JSON Schema. +The format, also known as "citeproc-JSON", has been codified in the CSL-JSON Schema. This same schema van be used to validate YAML. **At this point the CSL-JSON schema is not yet fully normative, and care must be taken to ensure compatibility with other tools built around CSL-JSON.** @@ -54,87 +54,6 @@ Whereas `csl-data.json` describes how the metadata of bibliographic items can be This includes information such as the order in which items are cited, which items are cited together in a single citation, etc. -### Mendeley CSL-JSON - -Mendeley provided the following documentation on their use of CSL-JSON: - -Support for the CSL Embedded Citation Object format is available in Mendeley Desktop 1.0 and later. - -The CSL citation data object consists of: - -* a required "schema" element of type "string", set to the URI of the schema -* a required "citationID" element of type "string" or "number", set to ??? -* a "citationItems" element of type "array", containing "objects" with the data of the individual cites. - The individual cite object are structured as: - + a required "id" element of type "string" or "number", set to an unique cite ID - + a "itemData" element of type "object", described in `csl-data.json/#/items` , - containing the metadata of a single bibliographic item - (this object is returned in citeproc-js by `sys.retrieveItem()` ) - + an "uris" element of type "array", which can contain any number of URIs (of type "string") to the bibliographic item - + a "prefix" element of type "string" - + a "suffix" element of type "string" - + a "locator" element of type "string" - + a "label" element of type "string", set to one of the CSL locator types (see ) - + a "suppress-author" element of type "string", "boolean" or "number" - + a "author-only" element of type "string", "boolean" or "number" -* a "properties" element of type "object" containing: - + a "noteIndex" element of type "number", set to the index of the footnote or endnote -* (Mendeley-specific) a "mendeley" element of type "object" containing: - + a "previouslyFormattedCitation" element of type "string", - set to the rendered output of the cite of the previous rendering round - (this can be used to determine if the user manually altered the output) - + a "manualFormatting" element of type "string", - set to the user-customized output of the cite (this output will be used in favor of the generated output) - -The method to embed metadata for citations and bibliographies typically varies between word processors. -Currently Mendeley uses: - -* For Word for Windows: - in-text citations and bibliographies are represented by a field code of type `wdFieldAddin` or temporarily represented as a bookmark if exporting to OpenOffice. - -* For OpenOffice: - in-text citations are of type `com.sun.star.text.ReferenceMark`. - Bibliographies are of type `com.sun.star.text.TextSection` or temporarily represented as a bookmark if exporting to Word. - -An example of an embedded citation object from Mendeley: - -```json -{ - "schema": "https://resource.citationstyles.org/schema/latest/input/json/csl-citation.json", - "citationID": "12rsus7rlj", - "citationItems": [ - { - "id": "ITEM-1", - "itemData": { - "id": "ITEM-1", - "issued": { - "date-parts": [ - [ - "2007" - ] - ] - }, - "title": "My paper", - "type": "journal-article" - }, - "locator": "21", - "label": "page", - "uris": [ - "http://www.mendeley.com/documents/?uuid=970e7ce0-8a21-482e-b7d6-e77794a2d37d", - "http://www.zotero.org/uniqueDocumentId" - ] - } - ], - "mendeley": { - "previouslyFormattedCitation": "(2007)", - "manualFormatting": "2007b" - }, - "properties": { - "noteIndex": 1 - } -} -``` - ## Licensing This repository is released under the [MIT license](LICENSE.txt). From 0ecf720de2d9e070a9fc251f8f98318442e5e762 Mon Sep 17 00:00:00 2001 From: Philipp Zumstein Date: Sun, 12 Jul 2020 13:54:30 +0200 Subject: [PATCH 39/61] Restructuring and Updating CONTRIBUTING.md (#312) Alines with the terms from the README.md (e.g. CSL-JSON Schema or add csl-categories.rnc). Also makes explicit a section about issues (with the text which was already there) and moved this together with PR on the top. The rules for versioning are much less frequent and therefore following, but also renamed from their previous title. --- CONTRIBUTING.md | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a9cb66b6..2e49ba01 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,31 +1,33 @@ # How to Contribute -## Schema Changes +## Pull Requests + +We encourage pull requests. Please use the following guidelines: + +- in general, follow [these recommendations](https://www.freecodecamp.org/news/writing-good-commit-messages-a-practical-guide/) on writing good commit messages +- make sure your PRs are focused, and link where possible to existing issues +- follow the instructions on the PR template + +## Issues + +Regardless of the change, however, the current status of CSL requires us to be fairly conservative. For issue reports, please follow the template instructions, and include all specified information. It's important for us to be able to quickly understand what you are requesting, how broad the need is, and what implementation options there are. + +## Versioning -### RELAX NG Style Language +### Changes to the CSL Schema At this point, changes to the CSL RELAX NG schema consist of the following:
-
Changes to csl-terms.rnc, csl-types.rnc, or csl-variables.rnc
+
Changes to csl-categories.rnc, csl-terms.rnc, csl-types.rnc, or csl-variables.rnc
Adding new variables, item types, locators, or terms; these can usually be added to minor x.x.x version changes.
Changes to csl.rnc
These are often more significant and may have an impact on compatability, and so are typically reserved for major x.x version changes.
-Regardless of the change, however, the current status of CSL requires us to be fairly conservative. For issue reports, please follow the template instructions, and include all specified information. It's important for us to be able to quickly understand what you are requesting, how broad the need is, and what implementation options there are. - -### JSON Data Schemas - -The data schemas are intended to mirror the rnc files, and so follow similar conventions. Ideally when we add variables, we add to both at the same time. - -## Pull Requests +### Changes to the CSL-JSON Schema -We encourage pull requests. Please use the following guidelines: - -- in general, follow [these recommendations](https://www.freecodecamp.org/news/writing-good-commit-messages-a-practical-guide/) on writing good commit messages -- make sure your PRs are focused, and link where possible to existing issues -- follow the instructions on the PR template +The data schemas are intended to mirror the `rnc` files, and so follow similar conventions. Ideally when we add variables, we add to both at the same time. ## Pre-Commit Hooks From d4adffb17aee88f091623b62e18bc75541caa72a Mon Sep 17 00:00:00 2001 From: Philipp Zumstein Date: Sun, 12 Jul 2020 14:49:39 +0200 Subject: [PATCH 40/61] readme: Add link to forum, fix typo (#314) --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7e973897..a5153179 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Current schemas include: (such as bibliographic metadata). For more information about CSL, visit . +For general quesions and discussions have a look at the [CSL-forum](https://discourse.citationstyles.org/). ## CSL Schema @@ -45,7 +46,7 @@ and currently consists of the following files: To render citations and bibliographies, CSL processors not only require CSL style and locale files, but also bibliographic metadata. The citeproc-js CSL processor [introduced](http://gsl-nagoya-u.net/http/pub/citeproc-doc.html#data-input) a JSON format to store such metadata, and this format has since been adopted by various other software products. -The format, also known as "citeproc-JSON", has been codified in the CSL-JSON Schema. This same schema van be used to validate YAML. +The format, also known as "citeproc-JSON", has been codified in the CSL-JSON Schema. This same schema can be used to validate YAML. **At this point the CSL-JSON schema is not yet fully normative, and care must be taken to ensure compatibility with other tools built around CSL-JSON.** From 648ff90012f39daaa9bb33ea83db9ed184bccb81 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Wed, 15 Jul 2020 16:59:36 -0400 Subject: [PATCH 41/61] Rename variables (#318) Rename creator to series-creator Rename writer to script-writer Added event-title and deprecated event --- schemas/input/csl-data.json | 23 +++-- schemas/styles/csl-data.rnc | 153 ++++++++++++++++-------------- schemas/styles/csl-relaxed.rnc | 9 +- schemas/styles/csl-repository.rnc | 85 ++++++++--------- schemas/styles/csl-variables.rnc | 14 +-- 5 files changed, 149 insertions(+), 135 deletions(-) diff --git a/schemas/input/csl-data.json b/schemas/input/csl-data.json index b3960517..ebd2e421 100644 --- a/schemas/input/csl-data.json +++ b/schemas/input/csl-data.json @@ -24,6 +24,7 @@ "entry", "entry-dictionary", "entry-encyclopedia", + "event", "figure", "graphic", "hearing", @@ -118,12 +119,6 @@ "$ref": "#/definitions/name-variable" } }, - "creator": { - "type": "array", - "items": { - "$ref": "#/definitions/name-variable" - } - }, "curator": { "type": "array", "items": { @@ -220,13 +215,19 @@ "$ref": "#/definitions/name-variable" } }, - "translator": { + "script-writer": { + "type": "array", + "items": { + "$ref": "#/definitions/name-variable" + } + }, + "series-creator": { "type": "array", "items": { "$ref": "#/definitions/name-variable" } }, - "writer": { + "translator": { "type": "array", "items": { "$ref": "#/definitions/name-variable" @@ -308,6 +309,10 @@ "type": ["string", "number"] }, "event": { + "description": "[Deprecated - use 'event-title' instead. Will be removed in 1.1]", + "type": "string" + }, + "event-title": { "type": "string" }, "event-place": { @@ -445,7 +450,7 @@ "custom": { "title": "Custom key-value pairs.", "type": "object", - "description": "Used to store additional information that does not have a designated CSL JSON field. The note field can also store additional information, but custom is preferred for storing key-value pairs.", + "description": "Used to store additional information that does not have a designated CSL JSON field. The custom field is preferred over the note field for storing custom data, particularly for storing key-value pairs, as the note field is used for user annotations in annotated bibliography styles.", "examples": [ { "short_id": "xyz", diff --git a/schemas/styles/csl-data.rnc b/schemas/styles/csl-data.rnc index 2590003c..1350df09 100644 --- a/schemas/styles/csl-data.rnc +++ b/schemas/styles/csl-data.rnc @@ -1,14 +1,20 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" namespace dc = "http://purl.org/dc/elements/1.1/" dc:title [ "Citation Style Language Data" ] dc:creator [ "Bruce D'Arcus" ] -dc:rights [ "Copyright 2009-2018 Citation Style Language and contributors" ] +dc:rights [ + "Copyright 2009-2018 Citation Style Language and contributors" +] dc:license [ "MIT license" ] dc:description [ "A schema for the CSL data model." ] include "csl-types.rnc" include "csl-variables.rnc" start = element references { reference+ } -reference = element reference { type, id, uri?, container-uri?, (contributor* & date* & variable+) } +reference = + element reference { + type, id, uri?, container-uri?, (contributor* & date* & variable+) + } ## Types div { @@ -17,88 +23,93 @@ div { ## Identifiers div { - - ## The id is an identifier unique to the scope of the file - id = attribute id { token } - - ## The URI is the global identity for the refererence; used to associate a citation reference to its data - uri = attribute uri { xsd:anyURI } - ## the URI for containing items (such as edited books or journals) - container-uri = attribute container-uri { xsd:anyURI } + ## The id is an identifier unique to the scope of the file + id = attribute id { token } + + ## The URI is the global identity for the refererence; used to associate a citation reference to its data + uri = attribute uri { xsd:anyURI } + + ## the URI for containing items (such as edited books or journals) + container-uri = attribute container-uri { xsd:anyURI } } ## Contributors div { - contributor = - element contributor { - attribute type { variables.names }, - name-elements - } - name-elements = - element name { text } - | ((element given { text }? & - element family { text }?) & - element dropping-particle { text }? & - element non-dropping-particle { text }? & - element suffix { text }?) + contributor = + element contributor { + attribute type { variables.names }, + name-elements + } + name-elements = + element name { text } + | ((element given { text }? + & element family { text }?) + & element dropping-particle { text }? + & element non-dropping-particle { text }? + & element suffix { text }?) } ## Dates div { - date = - element date { - attribute type { variables.dates }, - attribute circa { xsd:boolean }?, - (date-pattern | date-range) - } - date-pattern = - year-pattern, - ( ( month-pattern, day-pattern? ) | season-pattern )? - date-range = - element begin-date { date-pattern }, - element end-date { date-pattern }? - year-pattern = - attribute year { - xsd:integer { maxInclusive="-1" } - | xsd:integer { minInclusive="1" } - } - month-pattern = - attribute month { xsd:integer { minInclusive="1" maxInclusive="12" } } - day-pattern = - attribute day { xsd:integer { minInclusive="1" maxInclusive="31" } } - - # 1 = Spring, 2 = Summer, 3 = Fall, 4 = Winter - season-pattern = - attribute season { xsd:integer { minInclusive="1" maxInclusive="4" } } + date = + element date { + attribute type { variables.dates }, + attribute circa { xsd:boolean }?, + (date-pattern | date-range) + } + date-pattern = + year-pattern, + ((month-pattern, day-pattern?) | season-pattern)? + date-range = + element begin-date { date-pattern }, + element end-date { date-pattern }? + year-pattern = + attribute year { + xsd:integer { maxInclusive = "-1" } + | xsd:integer { minInclusive = "1" } + } + month-pattern = + attribute month { + xsd:integer { minInclusive = "1" maxInclusive = "12" } + } + day-pattern = + attribute day { + xsd:integer { minInclusive = "1" maxInclusive = "31" } + } + # 1 = Spring, 2 = Summer, 3 = Fall, 4 = Winter + season-pattern = + attribute season { + xsd:integer { minInclusive = "1" maxInclusive = "4" } + } } ## Simple Variables div { - variable = - element variable { - attribute type { variables.standard }, - (simple-variable-pattern | rich-variable-pattern) - } - simple-variable-pattern = text - rich-variable-pattern = - (text - | element abbr { text } - | element b { text } - | element cite { - - ## cited title which is a part (like an article), and so typically rendered in quotes, rather than italicized - attribute class { "part" }?, - text + variable = + element variable { + attribute type { variables.standard }, + (simple-variable-pattern | rich-variable-pattern) + } + simple-variable-pattern = text + rich-variable-pattern = + (text + | element abbr { text } + | element b { text } + | element cite { + + ## cited title which is a part (like an article), and so typically rendered in quotes, rather than italicized + attribute class { "part" }?, + text } - | element i { text } - | element sc { text } - | element span { - - ## text whose case should not be transformed (as with proper nouns) - attribute class { "protect" }?, - text + | element i { text } + | element sc { text } + | element span { + + ## text whose case should not be transformed (as with proper nouns) + attribute class { "protect" }?, + text } - | element sup { text } - | element sub { text })+ + | element sup { text } + | element sub { text })+ } diff --git a/schemas/styles/csl-relaxed.rnc b/schemas/styles/csl-relaxed.rnc index 01d5e123..fc257394 100644 --- a/schemas/styles/csl-relaxed.rnc +++ b/schemas/styles/csl-relaxed.rnc @@ -5,9 +5,8 @@ dc:title [ "Citation Style Language Schema - Relaxed" ] dc:creator [ "Bruce D'Arcus" ] dc:rights [ "Permission to freely use, copy and distribute." ] dc:description [ - "Relaxes the need for a cs:updated value in the official CSL schema." + "Relaxes the need for a cs:updated value in the official CSL schema." ] - -include "csl.rnc"{ - info-updated = element cs:updated { xsd:dateTime? } -} \ No newline at end of file +include "csl.rnc" { + info-updated = element cs:updated { xsd:dateTime? } +} diff --git a/schemas/styles/csl-repository.rnc b/schemas/styles/csl-repository.rnc index ce90469f..5a961df7 100644 --- a/schemas/styles/csl-repository.rnc +++ b/schemas/styles/csl-repository.rnc @@ -2,24 +2,25 @@ namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" namespace cs = "http://purl.org/net/xbiblio/csl" namespace dc = "http://purl.org/dc/elements/1.1/" -dc:title [ "Extension schema for the Citation Style Language styles repository" ] +dc:title [ + "Extension schema for the Citation Style Language styles repository" +] dc:creator [ "Rintze M. Zelle" ] -dc:rights [ "Copyright 2013-2018 Citation Style Language and contributors" ] +dc:rights [ + "Copyright 2013-2018 Citation Style Language and contributors" +] dc:license [ "MIT license" ] dc:description [ "Enforces stricter requirements for the styles in the official CSL styles repository." ] - include "csl.rnc" { - + ## Remove legacy attributes from cs:style of dependents dependent-style.style = element cs:style { - style.default-locale, - version, - dependent-style.style.info + style.default-locale, version, dependent-style.style.info } - + ## - Only allow cs:issn once ## - Require a cs:rights element ## - Forgo "interleave" (so the elements need to be in the order specified), @@ -50,7 +51,7 @@ include "csl.rnc" { info.updated, info.rights } - + ## - Only allow cs:issn once ## - Require a cs:rights element ## - Forgo "interleave" (so the elements need to be in the order specified), @@ -81,16 +82,18 @@ include "csl.rnc" { info.updated, info.rights } - + ## Require "license" attribute; require specific value for "license" attribute and ## text content for cs:rights info.rights = element cs:rights { - attribute license { "http://creativecommons.org/licenses/by-sa/3.0/" }, + attribute license { + "http://creativecommons.org/licenses/by-sa/3.0/" + }, attribute xml:lang { xsd:language }?, "This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License" } - + ## Remove legacy attributes from cs:et-al names.et-al = @@ -103,41 +106,35 @@ include "csl.rnc" { font-formatting } } - independent-style.info.link.self = -element cs:link { - attribute href { xsd:anyURI }, - attribute rel { "self" }, - info-text -} - + element cs:link { + attribute href { xsd:anyURI }, + attribute rel { "self" }, + info-text + } independent-style.info.link.template = -element cs:link { - attribute href { xsd:anyURI }, - attribute rel { "template" }, - info-text -} - + element cs:link { + attribute href { xsd:anyURI }, + attribute rel { "template" }, + info-text + } independent-style.info.link.independent-parent = -element cs:link { - attribute href { xsd:anyURI }, - attribute rel { "independent-parent" }, - info-text -} - + element cs:link { + attribute href { xsd:anyURI }, + attribute rel { "independent-parent" }, + info-text + } independent-style.info.link.documentation = -element cs:link { - attribute href { xsd:anyURI }, - attribute rel { "documentation" }, - info-text -} - + element cs:link { + attribute href { xsd:anyURI }, + attribute rel { "documentation" }, + info-text + } info.category.citation-format = -element cs:category { - attribute citation-format { category.citation-format } -} - + element cs:category { + attribute citation-format { category.citation-format } + } info.category.field = -element cs:category { - attribute field { category.field } -} \ No newline at end of file + element cs:category { + attribute field { category.field } + } diff --git a/schemas/styles/csl-variables.rnc b/schemas/styles/csl-variables.rnc index 6b73d671..fd059335 100644 --- a/schemas/styles/csl-variables.rnc +++ b/schemas/styles/csl-variables.rnc @@ -29,7 +29,6 @@ div { | "composer" | "container-author" | "contributor" - | "creator" | "curator" | "director" | "editor" @@ -47,8 +46,9 @@ div { | "producer" | "recipient" | "reviewed-author" + | "script-writer" + | "series-creator" | "translator" - | "writer" ## Number variables variables.numbers = @@ -64,10 +64,10 @@ div { | "number-of-volumes" | "page" | "page-first" - | "part" - | "printing" + | "part-number" + | "printing-number" | "section" - | "supplement" + | "supplement-number" | "version" | "volume" @@ -97,7 +97,9 @@ div { | "dimensions" | "division" | "DOI" - | "event" + | # Alias for 'event-title'. Deprecated. Will be removed in CSL 1.1. + "event" + | "event-title" | "event-place" | "genre" | "ISBN" From 46f498ef57ef2304fd7deda75e92439dd71b3256 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Sun, 9 Aug 2020 13:40:09 -0400 Subject: [PATCH 42/61] Remove reference to condition element from v1.0 --- schemas/styles/csl-choose.rnc | 1 - 1 file changed, 1 deletion(-) diff --git a/schemas/styles/csl-choose.rnc b/schemas/styles/csl-choose.rnc index e552f2b4..373d8a71 100644 --- a/schemas/styles/csl-choose.rnc +++ b/schemas/styles/csl-choose.rnc @@ -12,7 +12,6 @@ div { ## When specifying conditions, we allow either the attribute syntax or the element-based one. choose.condition = (condition.atts, match?) - | element cs:conditions { match, condition.elem+ } choose.if = element cs:if { choose.condition, rendering-element* } choose.else-if = element cs:else-if { choose.condition, rendering-element* } From 58141837f1552545d10d414c6cf287bfdf2ceb37 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Sun, 9 Aug 2020 13:41:31 -0400 Subject: [PATCH 43/61] Remove edtf data type from v1.0 cf. https://github.com/orgs/citation-style-language/teams/reviewers/discussions/6/comments/24 --- schemas/input/csl-data.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/schemas/input/csl-data.json b/schemas/input/csl-data.json index 4669d6c1..ef67819e 100644 --- a/schemas/input/csl-data.json +++ b/schemas/input/csl-data.json @@ -496,12 +496,6 @@ } ] }, - "edtf-datatype": { - "title": "EDTF datatype pattern", - "description": "CSL input supports EDTF, validated against this regular expression.", - "type": "string", - "pattern": "^[0-9-%~X?.\/]{4,}$" - }, "date-variable": { "title": "Date content model.", "description": "The CSL input model supports two different date representations: an EDTF string (preferred), and a more structured alternative.", @@ -535,9 +529,6 @@ }, "raw": { "type": "string" - }, - "edtf": { - "$ref": "#/definitions/edtf-datatype" } }, "additionalProperties": false From 996e71fcbf1477f9f88fcd4781e8b1156402420e Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Sun, 9 Aug 2020 13:48:55 -0400 Subject: [PATCH 44/61] Trang csl-choose.rnc --- schemas/styles/csl-choose.rnc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/schemas/styles/csl-choose.rnc b/schemas/styles/csl-choose.rnc index 373d8a71..cd0e5749 100644 --- a/schemas/styles/csl-choose.rnc +++ b/schemas/styles/csl-choose.rnc @@ -10,8 +10,7 @@ div { element cs:choose { choose.if, choose.else-if*, choose.else? } ## When specifying conditions, we allow either the attribute syntax or the element-based one. - choose.condition = - (condition.atts, match?) + choose.condition = condition.atts, match? choose.if = element cs:if { choose.condition, rendering-element* } choose.else-if = element cs:else-if { choose.condition, rendering-element* } From 9cd30cdd316dca99642958b16b1ce3237763292b Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Thu, 13 Aug 2020 17:18:03 -0400 Subject: [PATCH 45/61] Delete csl-data.rnc see https://github.com/citation-style-language/schema/issues/31#issuecomment-673493513 --- schemas/styles/csl-data.rnc | 115 ------------------------------------ 1 file changed, 115 deletions(-) delete mode 100644 schemas/styles/csl-data.rnc diff --git a/schemas/styles/csl-data.rnc b/schemas/styles/csl-data.rnc deleted file mode 100644 index 1350df09..00000000 --- a/schemas/styles/csl-data.rnc +++ /dev/null @@ -1,115 +0,0 @@ -namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" -namespace dc = "http://purl.org/dc/elements/1.1/" - -dc:title [ "Citation Style Language Data" ] -dc:creator [ "Bruce D'Arcus" ] -dc:rights [ - "Copyright 2009-2018 Citation Style Language and contributors" -] -dc:license [ "MIT license" ] -dc:description [ "A schema for the CSL data model." ] -include "csl-types.rnc" -include "csl-variables.rnc" -start = element references { reference+ } -reference = - element reference { - type, id, uri?, container-uri?, (contributor* & date* & variable+) - } - -## Types -div { - type = attribute type { item-types } -} - -## Identifiers -div { - - ## The id is an identifier unique to the scope of the file - id = attribute id { token } - - ## The URI is the global identity for the refererence; used to associate a citation reference to its data - uri = attribute uri { xsd:anyURI } - - ## the URI for containing items (such as edited books or journals) - container-uri = attribute container-uri { xsd:anyURI } -} - -## Contributors -div { - contributor = - element contributor { - attribute type { variables.names }, - name-elements - } - name-elements = - element name { text } - | ((element given { text }? - & element family { text }?) - & element dropping-particle { text }? - & element non-dropping-particle { text }? - & element suffix { text }?) -} - -## Dates -div { - date = - element date { - attribute type { variables.dates }, - attribute circa { xsd:boolean }?, - (date-pattern | date-range) - } - date-pattern = - year-pattern, - ((month-pattern, day-pattern?) | season-pattern)? - date-range = - element begin-date { date-pattern }, - element end-date { date-pattern }? - year-pattern = - attribute year { - xsd:integer { maxInclusive = "-1" } - | xsd:integer { minInclusive = "1" } - } - month-pattern = - attribute month { - xsd:integer { minInclusive = "1" maxInclusive = "12" } - } - day-pattern = - attribute day { - xsd:integer { minInclusive = "1" maxInclusive = "31" } - } - # 1 = Spring, 2 = Summer, 3 = Fall, 4 = Winter - season-pattern = - attribute season { - xsd:integer { minInclusive = "1" maxInclusive = "4" } - } -} - -## Simple Variables -div { - variable = - element variable { - attribute type { variables.standard }, - (simple-variable-pattern | rich-variable-pattern) - } - simple-variable-pattern = text - rich-variable-pattern = - (text - | element abbr { text } - | element b { text } - | element cite { - - ## cited title which is a part (like an article), and so typically rendered in quotes, rather than italicized - attribute class { "part" }?, - text - } - | element i { text } - | element sc { text } - | element span { - - ## text whose case should not be transformed (as with proper nouns) - attribute class { "protect" }?, - text - } - | element sup { text } - | element sub { text })+ -} From 7562ff5d5c15070efe4421c1d4a3a7a1762f0bd0 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Sun, 6 Sep 2020 18:21:49 -0400 Subject: [PATCH 46/61] Reconcile locator lists --- schemas/input/csl-citation.json | 9 ++++++--- schemas/styles/csl-terms.rnc | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/schemas/input/csl-citation.json b/schemas/input/csl-citation.json index 20ddbc6b..e8a62a4a 100644 --- a/schemas/input/csl-citation.json +++ b/schemas/input/csl-citation.json @@ -42,8 +42,9 @@ "label": { "type": "string", "enum": [ + "act", "appendix", - "article", + "article-locator", "book", "canon", "chapter", @@ -60,13 +61,15 @@ "paragraph", "part", "rule", + "scene", "section", - "sub verbo", + "sub-verbo", "supplement", "table", "timestamp", - "title", + "title-locator", "verse", + "version", "volume" ] }, diff --git a/schemas/styles/csl-terms.rnc b/schemas/styles/csl-terms.rnc index 97cb2f27..93f3fc55 100644 --- a/schemas/styles/csl-terms.rnc +++ b/schemas/styles/csl-terms.rnc @@ -146,7 +146,7 @@ div { | "sub-verbo" | "table" | "timestamp" - | "title" + | "title-locator" | "verse" | terms.locator-number-variables From ec0188bb8a8679d248808a362a566235bc380275 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Sun, 6 Sep 2020 18:27:06 -0400 Subject: [PATCH 47/61] Finish removal of edtf datatype from v1.0.2 --- schemas/input/csl-data.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/schemas/input/csl-data.json b/schemas/input/csl-data.json index ef67819e..085a8124 100644 --- a/schemas/input/csl-data.json +++ b/schemas/input/csl-data.json @@ -500,9 +500,6 @@ "title": "Date content model.", "description": "The CSL input model supports two different date representations: an EDTF string (preferred), and a more structured alternative.", "anyOf": [ - { - "$ref": "#/definitions/edtf-datatype" - }, { "properties": { "date-parts": { From 472bdf1a30a84f6f214121566e11c0369d16eda5 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Sun, 6 Sep 2020 18:40:43 -0400 Subject: [PATCH 48/61] Remove element-based conditions from 1.0.2 --- schemas/styles/csl-choose.rnc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/schemas/styles/csl-choose.rnc b/schemas/styles/csl-choose.rnc index cd0e5749..f9310b26 100644 --- a/schemas/styles/csl-choose.rnc +++ b/schemas/styles/csl-choose.rnc @@ -8,18 +8,11 @@ div { ## Use to conditionally render rendering elements. element cs:choose { choose.if, choose.else-if*, choose.else? } - - ## When specifying conditions, we allow either the attribute syntax or the element-based one. - choose.condition = condition.atts, match? - choose.if = element cs:if { choose.condition, rendering-element* } + choose.if = element cs:if { condition+, match, rendering-element* } choose.else-if = - element cs:else-if { choose.condition, rendering-element* } + element cs:else-if { condition+, match, rendering-element* } choose.else = element cs:else { rendering-element+ } - - ## This element allows for more complex conditional logic; for - ## example, if you need to specify mixed "match" rules. - condition.elem = element cs:condition { match?, condition.atts } - condition.atts = + condition = ## If used, the element content is only rendered if it disambiguates two ## otherwise identical citations. This attempt at disambiguation is only From 4369df674fbc736e5eda8ea906f8f1e4141d89b7 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Sat, 31 Oct 2020 11:25:01 -0400 Subject: [PATCH 49/61] Remove title splitting options from v1.0.2 --- schemas/styles/csl.rnc | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index e028de49..5e69df3d 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -906,48 +906,6 @@ div { "partial-first" }? - ## Options affecting rendering of title variables, for cs:style, cs:citation and cs:bibliography - title-inheritable-options = - - ## Inheritable title option, specify the delimiter between "title-main" and "title-sub". - attribute title-delimiter { text }?, - - ## Inheritable title option, specify the delimiter between multiple subtitles. - ## The same as "title-delimiter" if not specified. - attribute title-sub-delimiter { text }?, - - ## Inheritable title option, specify how titles are split into "title-main" and "title-sub". - [ a:defaultValue = "simple" ] - attribute title-split { - - ## Matches "."", ":", "::", "!", "?" - "simple" - | - ## Matches the values for "simple" plus ";" - "extended" - | - ## Matches the values for "simple" plus "—" and ";" - "full" - | - ## Matches the values for "simple" plus ";"" - ## and "[;,] or[,:]" (see CMoS 14.91), e.g. "Moby-Dick; or, The Whale" - "chicago" - }?, - - ## Inheritable title option, specify which delimiters are normalized. - [ a:defaultValue = "simple" ] - attribute normalize-title-delimiters { - - ## Normalize "."", ":", "::" - "simple" - | - ## Normalize the values for "simple" plus ";" - "extended" - | - ## Normalize the values for "simple" plus "—" and ";" - "full" - }? - ## Options affecting cs:names, for cs:style, cs:citation and cs:bibliography. names-inheritable-options = From ae658f046cb81941af5d73bb82c8b47098d6da74 Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Mon, 2 Nov 2020 09:34:59 -0500 Subject: [PATCH 50/61] Add apt-get update to XML test The GitHub workflow XML test job is failing because --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b7082915..608ed1bd 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -34,7 +34,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v2 - name: Install dependencies - run: sudo apt-get install --yes trang + run: sudo apt-get update && sudo apt-get install --yes trang - name: Check schema validity run: trang schemas/styles/csl.rnc csl.rng && trang csl.rng csl.rnc - name: Check schema formatting From 199c9ce89d95b2ea5cfdecb30f93c45bddaf4df8 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Mon, 2 Nov 2020 10:18:24 -0500 Subject: [PATCH 51/61] Add chicago page range variants (#380) Based on discussion re: citation-style-language/documentation#115, add chicago-15 and chicago-16 page range formats. Chicago changed its page range collapse rules in 16th edition. CSL currently follows 15th edition rules. This PR adds specific formats for the two versions. For 1.0.2, chicago will keep its current meaning and be an alias for chicago-15. In 1.1 and later, it will change to be an alias for chicago-16. --- .github/workflows/test.yaml | 2 +- schemas/styles/csl.rnc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b7082915..608ed1bd 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -34,7 +34,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v2 - name: Install dependencies - run: sudo apt-get install --yes trang + run: sudo apt-get update && sudo apt-get install --yes trang - name: Check schema validity run: trang schemas/styles/csl.rnc csl.rng && trang csl.rng csl.rnc - name: Check schema formatting diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index e028de49..6334d360 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -765,6 +765,8 @@ div { | "minimal-two" | "minimal-oup" | "chicago" + | "chicago-15" + | "chicago-16" | "mhra" }? citation.cite-group-delimiter = From adb59015e71a77a03b271a2c62b37fd013043ccb Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Sat, 7 Nov 2020 15:55:45 -0500 Subject: [PATCH 52/61] Remove cs:intext from v1.0.2 --- schemas/styles/csl.rnc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index ce675826..d28d4182 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -44,7 +44,6 @@ div { (style.locale* & style.macro* & style.citation - & style.intext? & style.bibliography?) } dependent-style.style = @@ -343,13 +342,6 @@ div { ## Use to describe the formatting of citations. element cs:citation { citation.options, sort?, citation.layout } - style.intext = - - ## Defines the author-only rendering for assembly of a textual citations - ## (for example, "Doe [3]" or "Doe (2018)"), where the output expectations - ## for in-text authors are different than the default citation rendering; - ## for example, in APA, or numeric styles. - element cs:intext { citation.options, sort?, citation.layout } style.bibliography = ## Use to describe the formatting of the bibliography. From 4d2f5dec8a127233bca58c9583d1e34c46c5ae29 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Sat, 7 Nov 2020 16:05:21 -0500 Subject: [PATCH 53/61] Fix version number. Remove 1.1 expanded "and" term --- schemas/styles/csl.rnc | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index d28d4182..b0453870 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -57,7 +57,7 @@ div { version = ## Indicate CSL version compatibility. - [ a:defaultValue = "1.1" ] attribute version { "1.1" } + [ a:defaultValue = "1.0" ] attribute version { "1.0" } } # ============================================================================== @@ -397,18 +397,14 @@ div { name.attributes = ## Use to separate the second-to-last and last name of a name list by - ## the "and" term. + ## the "and" term or ampersand. attribute and { - ## Use the "and" term "long" form (e.g., "Doe, Johnson and Smith"). - "long" + ## Use the "and" term (e.g., "Doe, Johnson and Smith"). + "text" | - ## Use the "and" term "symbol" form (e.g., "Doe, Johnson & Smith"). + ## Use the "ampersand" (e.g., "Doe, Johnson & Smith"). "symbol" - | - ## Use the "and" term "short" form. Not common in English, but is seen in other languages. - ## In German, for example: "Doe, Johnson u. Smith, where "u." is short for "und." - "short" }?, ## Specify when the name delimiter is used between a truncated name list From 830ef642ad9bbef9ffd0c32100b0d0ae08b23df0 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Sat, 7 Nov 2020 16:07:44 -0500 Subject: [PATCH 54/61] Remove main/sub form of titles --- schemas/styles/csl.rnc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index b0453870..65fdbcfc 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -634,11 +634,8 @@ div { | ## Specify verbatim text. attribute value { text } - | ((attribute variable { variables.numbers | variables.strings }, - [ a:defaultValue = "long" ] attribute form { "short" | "long" }) - | (attribute variable { variables.titles }, - [ a:defaultValue = "long" ] - attribute form { "short" | "long" | "sub" | "main" })?) + | ((attribute variable { variables.standard }, + [ a:defaultValue = "long" ] attribute form { "short" | "long" })?) } # ============================================================================== From 070718fd5f399f33bf261db12c1f9d1d82292970 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Sat, 7 Nov 2020 16:13:03 -0500 Subject: [PATCH 55/61] Remove title-inheritable-options --- schemas/styles/csl.rnc | 3 --- 1 file changed, 3 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index 65fdbcfc..44d85512 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -708,7 +708,6 @@ div { style.demote-non-dropping-particle, style.initialize-with-hyphen, style.page-range-format, - title-inheritable-options, names-inheritable-options, name-inheritable-options citation.options = @@ -716,7 +715,6 @@ div { citation.collapse-options, citation.disambiguate-options, citation.near-note-distance, - title-inheritable-options, names-inheritable-options, name-inheritable-options bibliography.options = @@ -724,7 +722,6 @@ div { bibliography.line-formatting-options, bibliography.second-field-align, bibliography.subsequent-author-substitute-options, - title-inheritable-options, names-inheritable-options, name-inheritable-options style.demote-non-dropping-particle = From e3cbc23910a083bea36eab2149960d35255ca440 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Sat, 7 Nov 2020 16:14:13 -0500 Subject: [PATCH 56/61] Remove minimal-oup and mhra page-range-format options --- schemas/styles/csl.rnc | 2 -- 1 file changed, 2 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index 44d85512..02dedd7d 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -745,11 +745,9 @@ div { "expanded" | "minimal" | "minimal-two" - | "minimal-oup" | "chicago" | "chicago-15" | "chicago-16" - | "mhra" }? citation.cite-group-delimiter = From b7380952bf0ebc44a5aab4d91942ff23122badfd Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Sat, 7 Nov 2020 16:16:14 -0500 Subject: [PATCH 57/61] Remove capitalize-subtitle, restore sentence cases --- schemas/styles/csl.rnc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index 02dedd7d..b539685c 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -1000,10 +1000,6 @@ div { ## Capitalizes the first character (other characters remain in ## their original case). "capitalize-first" - | - ## Capitalizes the first character and the first character of a subtitle - ## (other characters remain in their original case). - "capitalize-subtitle" | ## Capitalizes the first character of every word (other characters ## remain in their original case). @@ -1011,5 +1007,9 @@ div { | ## Renders text in title case. "title" + | + ## Renders text in sentence case. + ## Deprecated. Will be removed in CSL 1.1 + "sentence" }? } From c4445abfed5f0f84302bbf18472e01eaa213c859 Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Sat, 7 Nov 2020 16:29:27 -0500 Subject: [PATCH 58/61] Run trang --- schemas/styles/csl.rnc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index b539685c..af34a85d 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -403,7 +403,7 @@ div { ## Use the "and" term (e.g., "Doe, Johnson and Smith"). "text" | - ## Use the "ampersand" (e.g., "Doe, Johnson & Smith"). + ## Use the "ampersand" (e.g., "Doe, Johnson & Smith"). "symbol" }?, @@ -634,8 +634,8 @@ div { | ## Specify verbatim text. attribute value { text } - | ((attribute variable { variables.standard }, - [ a:defaultValue = "long" ] attribute form { "short" | "long" })?) + | (attribute variable { variables.standard }, + [ a:defaultValue = "long" ] attribute form { "short" | "long" })? } # ============================================================================== @@ -1007,7 +1007,7 @@ div { | ## Renders text in title case. "title" - | + | ## Renders text in sentence case. ## Deprecated. Will be removed in CSL 1.1 "sentence" From 2f886daac265288d67ef8f012c086820f14d0717 Mon Sep 17 00:00:00 2001 From: denismaier Date: Wed, 16 Jun 2021 17:19:14 +0200 Subject: [PATCH 59/61] make @form optional --- schemas/styles/csl.rnc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index af34a85d..c7680559 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -634,8 +634,10 @@ div { | ## Specify verbatim text. attribute value { text } - | (attribute variable { variables.standard }, - [ a:defaultValue = "long" ] attribute form { "short" | "long" })? + | ( + ## Select a variable. + attribute variable { variables.standard }, + [ a:defaultValue = "long" ] attribute form { "short" | "long" }?) } # ============================================================================== From bbe63fb95ad89de9adc02b64567d8df37229ca05 Mon Sep 17 00:00:00 2001 From: denismaier Date: Thu, 17 Jun 2021 10:17:47 +0200 Subject: [PATCH 60/61] re-add title-short and container-title-short --- schemas/styles/csl-variables.rnc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/schemas/styles/csl-variables.rnc b/schemas/styles/csl-variables.rnc index 88673301..04c6f91d 100644 --- a/schemas/styles/csl-variables.rnc +++ b/schemas/styles/csl-variables.rnc @@ -80,6 +80,11 @@ div { | "reviewed-title" | "title" | "volume-title" + | # Short title forms. Will be removed in CSL 1.1 + "title-short" + | "container-title-short" + + ## String variables variables.strings = From 10dec41d61bb293834ce3a93fffacf0fc7bfe4b8 Mon Sep 17 00:00:00 2001 From: denismaier Date: Fri, 18 Jun 2021 13:45:20 +0200 Subject: [PATCH 61/61] run trang --- schemas/styles/csl-variables.rnc | 2 -- 1 file changed, 2 deletions(-) diff --git a/schemas/styles/csl-variables.rnc b/schemas/styles/csl-variables.rnc index 04c6f91d..fe66d5e8 100644 --- a/schemas/styles/csl-variables.rnc +++ b/schemas/styles/csl-variables.rnc @@ -83,8 +83,6 @@ div { | # Short title forms. Will be removed in CSL 1.1 "title-short" | "container-title-short" - - ## String variables variables.strings =