diff --git a/schemas/styles/csl-choose.rnc b/schemas/styles/csl-choose.rnc index 7128ebb2..57cdd5e0 100644 --- a/schemas/styles/csl-choose.rnc +++ b/schemas/styles/csl-choose.rnc @@ -11,8 +11,8 @@ 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+ } + (condition.atts, relation, match?) + | element cs:conditions { match?, relation, condition.elem+ } choose.if = element cs:if { choose.condition, rendering-element* } choose.else-if = element cs:else-if { choose.condition, rendering-element* } @@ -20,7 +20,8 @@ div { ## 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.elem = + element cs:condition { match?, relation, condition.atts } condition.atts = (condition.atts.simple+, condition.atts.complex?) | condition.atts.complex @@ -30,6 +31,11 @@ div { ## 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 item has the given relation. + attribute has-relation { + list { relations+ } + } | ## Tests whether the given variables contain numeric text. attribute is-numeric { diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc index a81acee5..72324cc9 100644 --- a/schemas/styles/csl.rnc +++ b/schemas/styles/csl.rnc @@ -414,6 +414,7 @@ div { attribute variable { list { variables.names+ } }, + relation, affixes, ## Specify the delimiter for name lists of name variables rendered by @@ -690,6 +691,7 @@ div { date.form, rendering-element.date.date-part.localized*) | (rendering-element.date.date-part.non-localized+, delimiter)), + relation, affixes, display, font-formatting, @@ -777,10 +779,12 @@ div { ## Specify verbatim text. attribute value { text } | ((attribute variable { variables.numbers | variables.strings }, - [ a:defaultValue = "long" ] attribute form { "short" | "long" }) + [ a:defaultValue = "long" ] attribute form { "short" | "long" }, + relation) | (attribute variable { variables.titles }, [ a:defaultValue = "long" ] - attribute form { "short" | "long" | "sub" | "main" })?) + attribute form { "short" | "long" | "sub" | "main" }, + relation)?) } # ============================================================================== @@ -803,7 +807,10 @@ div { ## Number forms: "numeric" ("4"), "ordinal" ("4th"), "long-ordinal" ## ("fourth"), "roman" ("iv"). [ a:defaultValue = "numeric" ] - attribute form { "numeric" | "ordinal" | "long-ordinal" | "roman" }? + attribute form { + "numeric" | "ordinal" | "long-ordinal" | "roman" + }?, + relation } # ============================================================================== @@ -846,7 +853,8 @@ div { delimiter, display, font-formatting, - rendering-element+ + rendering-element+, + relation } group.attributes = notAllowed? } @@ -1136,6 +1144,12 @@ div { always-render = attribute always-render { xsd:boolean }? } +## Select a related-variable +div { + relation = attribute relation { relations }? + relations = "original" | "reviewed" +} + ## Formatting attributes. div { affixes =