Skip to main content

Module parser

Module parser 

Source
Expand description

Parse a CSL 1.0.2 style document into the typed Style AST.

A read-only [roxmltree] DOM walk, dispatching on element local names. The <style> root must be in the CSL namespace or none (an unnamespaced root is tolerated; a foreign namespace is rejected).

It models the structure and common attributes; unmodelled attributes are ignored, unknown rendering elements are a CslParseError, and in-style <locale> blocks are retained as raw XML for a later locale slice.

ConstantsΒ§

CSL_NAMESPACE πŸ”’
The CSL XML namespace. A namespaced <style> root must use it.

FunctionsΒ§

attr πŸ”’
An attribute as an owned String, if present.
bool_attr πŸ”’
A boolean attribute: true only when the value is exactly "true".
child_elements πŸ”’
Element-only children of node (skips text, comments, and whitespace).
column_to_byte_offset πŸ”’
err_at πŸ”’
Build an error anchored at a node’s start byte offset.
line_at πŸ”’
parse_bibliography πŸ”’
parse_bibliography_options πŸ”’
parse_choose πŸ”’
parse_citation πŸ”’
parse_citation_options πŸ”’
parse_common πŸ”’
parse_conditions πŸ”’
parse_date πŸ”’
parse_element πŸ”’
parse_elements πŸ”’
parse_group πŸ”’
parse_info πŸ”’
parse_info_category πŸ”’
parse_info_contributor πŸ”’
parse_info_link πŸ”’
parse_inheritable_name_options πŸ”’
parse_label πŸ”’
parse_layout πŸ”’
parse_layout_and_sort πŸ”’
parse_locale πŸ”’
parse_name_element πŸ”’
parse_names πŸ”’
parse_number πŸ”’
parse_sort πŸ”’
parse_sort_key_options πŸ”’
parse_style
Parse input as a CSL 1.0.2 style.
parse_style_options πŸ”’
parse_text πŸ”’
text_pos_to_byte_offset πŸ”’
tokens πŸ”’
A whitespace-separated attribute split into owned tokens.