Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sub/main form values to cs:text #271

Merged
merged 4 commits into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 7 additions & 28 deletions schemas/styles/csl-variables.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -20,7 +20,7 @@ div {
| "issued"
| "original-date"
| "submitted"

## Name variables
variables.names =
"author"
Expand All @@ -44,7 +44,7 @@ div {
| "recipient"
| "reviewed-author"
| "translator"

## Number variables
variables.numbers =
"chapter-number"
Expand All @@ -63,34 +63,16 @@ div {
| "printing"
| "supplement"
| "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"
Expand Down Expand Up @@ -134,10 +116,7 @@ div {
| "section"
| "source"
| "status"
| "title"
| "title-short"
| "translated-title"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

translated-title should be under "variables.titles", shouldn't it?

| "translated-title-short"
| "URL"
| "version"
| "year-suffix"
Expand Down
20 changes: 13 additions & 7 deletions schemas/styles/csl.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -321,6 +321,11 @@ div {
attribute name { xsd:NMTOKEN },
rendering-element+
}
}
# ==============================================================================

## Rendering Elements
div {
rendering-element =
rendering-element.names
| rendering-element.date
Expand Down Expand Up @@ -641,10 +646,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" })?)
}
# ==============================================================================

Expand Down Expand Up @@ -909,7 +915,7 @@ div {
[ a:defaultValue = "simple" ]
attribute title-split {

## Matches "."", ":", "::", "!", "?"
## Matches "."", ":", "::", "!", "?"
"simple"
|
## Matches the values for "simple" plus ";"
Expand All @@ -918,7 +924,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"
}?,
Expand Down