The text level: a shared, source-independent semantics for written documents — sections, paragraphs, quotes, lists, and verbatim blocks — produced by format crates and served by this crate's single adapter.
The block model follows the atrep markup language (litogramma's
koine core): every block is (kind, taxis?, lemma?, body, hypograph?) — the lemma is the head or title, the hypograph the
footer or attribution, and a paragraph is the degenerate
lemma-less, hypograph-less block. Producers (quarb-text-html,
quarb-text-markdown, the built-in plain-text reader) lower
their format into the [Block] event stream; this crate derives
the section tree and implements the adapter once, so
//section[::lemma ...], //paragraph, and //blockquote read
identically over any text substrate — including an atrep
document mounted by quarb-atrep.
- Node names are the structural kinds:
section,paragraph,blockquote,unordered-list,ordered-list,unordered-item,ordered-item,verbatim. ::lemma,::hypograph, and::taxisare properties; bare::(and::text) is the flattened prose of the subtree, lemma first, hypograph last.::::levelon a section is the source heading level;::::langon a verbatim block is its declared language.- Sections are derived from the flat heading stream by the outline rule: a heading closes every open section at its level or deeper, then opens a section under the nearest shallower one. Content before the first heading belongs to the document root. A heading inside an open container (blockquote, list) is decorative, not sectioning: it lowers to a paragraph of its text.
- Tables denormalize into nested lists: an
ordered-listcarrying the<table>trait (::lemma= the caption), oneordered-itemper row (::taxis= row number), oneunordered-itemper cell —Header: valuewhere a header row exists, the bare cell text otherwise. Empty cells are skipped.