Skip to content

Commit

Permalink
Merge branch 'v1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
bwiernik committed Oct 22, 2021
2 parents c214211 + ea19f7a commit 5060400
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 86 deletions.
14 changes: 1 addition & 13 deletions schemas/input/csl-data.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -496,19 +496,10 @@
}
]
},
"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": {
Expand All @@ -535,9 +526,6 @@
},
"raw": {
"type": "string"
},
"edtf": {
"$ref": "#/definitions/edtf-datatype"
}
},
"additionalProperties": false
Expand Down
3 changes: 3 additions & 0 deletions schemas/styles/csl-variables.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ 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 =
Expand Down
88 changes: 15 additions & 73 deletions schemas/styles/csl.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ div {
(style.locale*
& style.macro*
& style.citation
& style.intext?
& style.bibliography?)
}
dependent-style.style =
Expand All @@ -58,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" }
}
# ==============================================================================

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -405,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
Expand Down Expand Up @@ -646,11 +634,10 @@ 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" })?)
| (
## Select a variable.
attribute variable { variables.standard },
[ a:defaultValue = "long" ] attribute form { "short" | "long" }?)
}
# ==============================================================================

Expand Down Expand Up @@ -723,23 +710,20 @@ 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 =
citation.cite-group-delimiter,
citation.collapse-options,
citation.disambiguate-options,
citation.near-note-distance,
title-inheritable-options,
names-inheritable-options,
name-inheritable-options
bibliography.options =
bibliography.hanging-indent,
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 =
Expand All @@ -763,9 +747,9 @@ div {
"expanded"
| "minimal"
| "minimal-two"
| "minimal-oup"
| "chicago"
| "mhra"
| "chicago-15"
| "chicago-16"
}?
citation.cite-group-delimiter =

Expand Down Expand Up @@ -906,48 +890,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 =

Expand Down Expand Up @@ -1060,16 +1002,16 @@ 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).
"capitalize-all"
|
## Renders text in title case.
"title"
|
## Renders text in sentence case.
## Deprecated. Will be removed in CSL 1.1
"sentence"
}?
}

0 comments on commit 5060400

Please sign in to comment.