Change operations v1.1: table ops, positioned node insert, change grammar - #61
Open
ronaldtse wants to merge 2 commits into
Open
Change operations v1.1: table ops, positioned node insert, change grammar#61ronaldtse wants to merge 2 commits into
ronaldtse wants to merge 2 commits into
Conversation
…mmar
The change tier is extended so every construct in the model is
addressable for collaborative editing (OT/CRDT-grade). This answers
two TC 154 questions on the document: how fine-grained operations on
tables and computed content are exchanged, and how change ordering
relates to concurrent editing.
models/change/tables (new):
TableChange root, TableArea enum (head/body/foot),
CellCoordinate; RowInsert/RowDelete/RowMove, ColumnInsert/Column
Delete/ColumnMove, CellUpdate/CellMerge/CellSplit. Grid coordinates
account for colspan/rowspan.
models/change:
NodePosition (parent reference + zero-based child ordinal);
NodeInsert gains +position.
grammars/basicdoc.rnc:
New change grammar (changeset + change + all ops); basicdoc-compile
start now permits document | changeset.
fixtures:
examples/table-changes.{xml,yaml} — twin ChangeSet exercising every
operation over the line-item table (li1t1), including a computed
cell (FormulaBlock in a ParagraphTableCell).
views:
Changes.lml extended with the new family and inheritance; new
TableChanges.lml focused plate. Renders as Changes.png and
TableChanges.png.
Gates: rake check + rake fixtures + rake profiles green
(135 model files, 17 views).
A purchase order as a base BasicDocument: trade identifiers on the document register with ISO 6523 scheme keys, clause text in sections, line items in a table, computed total cells as formula blocks. Referenced by the specification's Annex E (business document interchange).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change operations v1.1
The change tier is extended so every construct in the model is
addressable for collaborative editing (OT/CRDT-grade). This answers
two committee questions on the document:
How are fine-grained operations on tables and computed content
exchanged? — the whole change family now covers row/column
insert/delete/move, cell update, cell merge, and cell split with
grid coordinates that account for colspan/rowspan. Computed cells
(formulas in cells) ride the existing stem construct with an open
notation key — no new types needed.
How does change ordering relate to concurrent editing? —
the existing
parentIdentifierfield already provides the causalDAG of changes. The new clause 11 v1.1 subclauses (in the spec
PR) state plainly: changes are operation records, ordering is
the DAG, and how concurrent operations transform against each
other (OT, CRDT, diff/patch) is out of scope — the same neutrality
pattern as serialization.
Models
models/change/tables/— new family:TableChangerootTableAreaenum (head / body / foot)CellCoordinate(row, column — zero-based grid slots)RowInsert/RowDelete/RowMove(with area)ColumnInsert/ColumnDelete/ColumnMove(with templatecell)
CellUpdate/CellMerge/CellSplitmodels/change/NodePosition.lml— new: container reference +zero-based child ordinal.
models/change/NodeInsert.lml— gains+position(was: only+content; insertion point is now explicit).Grammar
grammars/basicdoc.rnc— change grammar (changeset + change +all operations) appended in lockstep with the LML. Targets use
plain text (cross-document identifiers), not IDREF.
grammars/basicdoc-compile.rnc—start = document | changeset.Fixtures
examples/table-changes.{xml,yaml}— twin ChangeSet exercisingevery operation over the line-item table (li1t1) in
document.xml, including a computed cell (FormulaBlock inside a
ParagraphTableCell): row insert → column insert → header cell
update → computed cell update → merge → split → row move
(body→foot) → column move → row delete → positioned node insert
→ node delete (with hash) → node move → cursor-range text edit →
register entry update.
Views
views/Changes.lml— extended with the new family and theinheritance associations.
views/TableChanges.lml— new focused plate.images/Changes.png(regenerated),images/TableChanges.png.Gates
135 model files, 17 views, 135 types.
What did NOT change
unchanged. The audit confirmed every content construct is already
one of four addressable shapes (string content, key/value slot,
ordered sequence, table grid); the missing operations on
ordered sequences (positioned node insert) and tables (the whole
family) are exactly what this PR adds.
The spec half (clause 11 subclauses, Annex E business interchange,
Annex D extension, submodule pin) follows in the cc-lightweight-doc
PR.