pub struct Table {
pub rows: Vec<Vec<String>>,
pub location: Option<[u16; 4]>,
pub structure: Option<TableStructure>,
pub cell_blocks: Option<Vec<Vec<Vec<Node>>>>,
}Expand description
A simple row-major table. By default rows[0] is the header row; a
TableStructure overlay overrides that and adds column spans.
Fields§
§rows: Vec<Vec<String>>§location: Option<[u16; 4]>Optional layout provenance: the four DocLang <location> values
(x0,y0,x1,y1, each already normalized to the 0–511 resolution) emitted
before the table’s cells. Set only by backends with real geometry (e.g.
the spreadsheet backend, whose cell grid yields a bounding box); left
None by declarative backends, which have no coordinates.
structure: Option<TableStructure>Optional OTSL structure overlay for backends that parse real table
geometry (USPTO CALS): explicit header-row count and horizontal-span
continuations. None → the default (row 0 is the header, no spans).
rows still carries the full text grid (span text replicated) for
Markdown/JSON; DocLang uses this overlay to emit <ched/>/<lcel/>.
cell_blocks: Option<Vec<Vec<Vec<Node>>>>Optional per-cell block content, parallel to rows. A rich cell (an
ODF cell holding a list, several paragraphs, or a nested table) carries
its DocLang blocks here; the DocLang serializer emits them after the
cell token instead of the flat rows text. Markdown/JSON ignore this
and render rows, so their output is unchanged. None (or an empty
Vec for a given cell) → the flat text is used everywhere.