diff --git a/docs/spec/presentation.md b/docs/spec/presentation.md index bb93949..7e75fe4 100644 --- a/docs/spec/presentation.md +++ b/docs/spec/presentation.md @@ -158,6 +158,29 @@ The template is a tree of layout tags (`page`, `header` / `footer`, `section` / {{}} a line-item field (inside a table bound to the items) ``` +A `table` (or a row-expanding `for`) can **filter** the collection it renders — a declarative value match, never an expression: `filter=""` keeps the rows whose path (resolved per row) is truthy, and adding `match="A | B"` keeps only the rows whose value equals one of the `|`-separated literals. The same `match` on an `if` compares its resolved `source` against the listed values instead of testing truthiness. One bound collection can this way render into several purpose-grouped tables — the two-column payslip (earnings left, deductions right), a journal entry's debit and credit sides, a VAT summary per rate: + +```text + + + Earnings + + {{Name}} + {{Amount}} +
+
+ + Deductions + + {{Name}} + {{Amount}} +
+
+
+``` + +A generator that predates the attributes ignores them and renders all rows — a filtered template never fails on an older platform. + ::: info Normative The print template is written **create-if-absent** and never regenerated over. A printed document is a formatted, audited artefact you adapt by hand, and a newly added model field must not silently appear on an already-designed document. :::