Expand description
The typed CSL style AST produced by parse_style.
This models the structure of a CSL 1.0.2 style; the <style> root, its
<info>, <citation>, <bibliography>, and <macro> children, and the
rendering elements (Element) with their common attributes. It is a
faithful structural model, not a processor: there is no evaluation of a
style against data here. Rendering-critical options are retained on typed
option structs so a future processor can interpret them. Attributes outside
the modelled set are ignored; unknown rendering elements are a parse error.
Structs§
- Bibliography
- The
<bibliography>element: how bibliography entries are formatted. - Bibliography
Options <bibliography>options retained but not evaluated.- Branch
- One
<if>/<else-if>branch of aChoose. - Choose
<choose>: conditional rendering.- Citation
- The
<citation>element: how cites are formatted. - Citation
Options <citation>options retained but not evaluated.- Common
- Common rendering attributes shared across most CSL elements (affixes,
formatting, and
delimiter). Unmodelled attributes are ignored by the parser. - Conditions
- The conditions on an
<if>/<else-if>. - Date
Element <date>: renders a date variable, localized or with explicit parts.- Date
Part - A
<date-part>child of<date>. - EtAl
- The
<et-al>child of<names>. - Group
<group>: a delimited, conditionally-suppressed run of elements.- Info
- Style metadata (
<info>). Only the commonly-needed fields are modelled. - Info
Category - An
<info><category .../>entry. - Info
Contributor - An
<info><author>or<info><contributor>entry. - Info
Link - An
<info><link .../>entry. - Inheritable
Name Options - Inheritable name options, valid on
<style>,<citation>,<bibliography>, and<name>. Retained but not evaluated; a processor applies them as the cascading defaults a<name>element inherits. - Label
<label>: renders a term matching a variable.- Layout
- A
<layout>: an ordered list of rendering elements plus common attributes. - Locale
Block - An in-style
<locale>block retained but not interpreted. - Name
Element - The
<name>child of<names>(a subset of its many options). - Name
Part - A
<name-part>child of<name>. - Names
<names>: renders one or more name variables.- Number
<number>: renders a number variable.- SortKey
- One
<key>in a<sort>. - Sort
KeyOptions <key>options retained but not evaluated.- Style
- A parsed CSL style (the
<style>root element). - Style
Options - Global
<style>rendering options retained but not evaluated. - Text
<text>: renders a variable, macro, term, or literal value.
Enums§
- Element
- A CSL rendering element.
- Match
- The
matchattribute on a condition set. - Sort
Target - What a
SortKeysorts on. - Style
Class - The
classof a CSL style. - Text
Source - What a
Textelement renders.