Make great documentation goal 1.2, and plan the README's reorganisation and the nested-template gaps #33
@@ -73,6 +73,7 @@ In [docs/decisions.md](docs/decisions.md):
|
|||||||
- After a row, a path names a column or a linked table
|
- After a row, a path names a column or a linked table
|
||||||
- A selected row is fixed, not drawn, and an unnamed read beside it is refused
|
- A selected row is fixed, not drawn, and an unnamed read beside it is refused
|
||||||
- A link column after a row steps up to the parent row, and a path may not end on it
|
- A link column after a row steps up to the parent row, and a path may not end on it
|
||||||
|
- A selector names a row by its key alone
|
||||||
- A parent row with no child row is a load error
|
- A parent row with no child row is a load error
|
||||||
- The choice-of-rows fence guards a data file's root, and requires string fields
|
- The choice-of-rows fence guards a data file's root, and requires string fields
|
||||||
- A table is a record of string columns
|
- A table is a record of string columns
|
||||||
|
|||||||
+13
-2
@@ -368,8 +368,7 @@ exactly one row.
|
|||||||
renders `Stockholm / Helsinki`, and two items of one choice may select different rows.
|
renders `Stockholm / Helsinki`, and two items of one choice may select different rows.
|
||||||
- What a path draws beneath a selected row is one draw per selection, per render and
|
- What a path draws beneath a selected row is one draw per selection, per render and
|
||||||
group, shared by every path through it: `{/geo.SE.municipality[1281].locality.name}`
|
group, shared by every path through it: `{/geo.SE.municipality[1281].locality.name}`
|
||||||
twice names one locality. `[1281]` and `[Lund]` select one row, so they are one
|
twice names one locality.
|
||||||
selection.
|
|
||||||
- A read whose path selects no row is refused beside a selection in its family, in the
|
- A read whose path selects no row is refused beside a selection in its family, in the
|
||||||
same render and group, naming the rewrite through each selection and a `drawGroup`:
|
same render and group, naming the rewrite through each selection and a `drawGroup`:
|
||||||
beside `{/misc.territory[SE].capital}`, a writer reading `{/misc.territory.currency}`
|
beside `{/misc.territory[SE].capital}`, a writer reading `{/misc.territory.currency}`
|
||||||
@@ -396,11 +395,23 @@ parent. A row is selected or drawn alike.
|
|||||||
of `{name} ({alpha2})`, `city[Oslo].country` names `city[Oslo].country.alpha2` and
|
of `{name} ({alpha2})`, `city[Oslo].country` names `city[Oslo].country.alpha2` and
|
||||||
`{/city[Oslo].country.name} ({/city[Oslo].country.alpha2})`. `List` leaves such a path
|
`{/city[Oslo].country.name} ({/city[Oslo].country.alpha2})`. `List` leaves such a path
|
||||||
out, and a record's link column still holds the key, since it is a column, not a path.
|
out, and a record's link column still holds the key, since it is a column, not a path.
|
||||||
|
- A path may not step back down into a child table after a step up:
|
||||||
|
`city[Oslo].country.city.name` could be Oslo or a city of Norway drawn afresh, so it is
|
||||||
|
refused, naming `city[Oslo].name` and `country[NO].city.name`.
|
||||||
|
- A route through another row is another path to the same data, not a second spelling:
|
||||||
|
`city[Oslo].country.name` and `country[NO].name` both load.
|
||||||
|
|
||||||
Checked against three simulated template writers from the Audience: all three read the
|
Checked against three simulated template writers from the Audience: all three read the
|
||||||
parent row where a segment followed, and they split between the code and the name where
|
parent row where a segment followed, and they split between the code and the name where
|
||||||
the path ended.
|
the path ended.
|
||||||
|
|
||||||
|
## A selector names a row by its key alone
|
||||||
|
|
||||||
|
Decided 2026-09-27 by the maintainer, for goal 4's one spelling per result. A table with
|
||||||
|
a `key` selects by it alone: `country[NO]` loads, and `country[Norway]` is refused
|
||||||
|
naming `[NO]`, since a name could spell another row's key. A table with no `key`
|
||||||
|
selects by its `name` inside its parent, which is the key it has.
|
||||||
|
|
||||||
## A parent row with no child row is a load error
|
## A parent row with no child row is a load error
|
||||||
|
|
||||||
A descendant is drawn inside the nearest pinned ancestor, so every ancestor row must
|
A descendant is drawn inside the nearest pinned ancestor, so every ancestor row must
|
||||||
|
|||||||
@@ -174,10 +174,16 @@ by a `data-import/` script, as README goal 12 asks.
|
|||||||
|
|
||||||
- Step up from a row to its parent as the decision "A link column after a row steps up
|
- Step up from a row to its parent as the decision "A link column after a row steps up
|
||||||
to the parent row, and a path may not end on it" states: `city[Oslo].country.name` is
|
to the parent row, and a path may not end on it" states: `city[Oslo].country.name` is
|
||||||
a load error today, and `city[Oslo].country` renders the cell `NO`, as
|
a load error today, `city[Oslo].country.city.name` draws a city, and
|
||||||
|
`city[Oslo].country` renders the cell `NO`, as
|
||||||
`locality.municipality` does, which `List` stops advertising. Replace the README's
|
`locality.municipality` does, which `List` stops advertising. Replace the README's
|
||||||
`city[Oslo].country` example with `fejkdata -d ./mydata 'city[Oslo].country.name'`,
|
`city[Oslo].country` example with `fejkdata -d ./mydata 'city[Oslo].country.name'`,
|
||||||
rendering `Norway`.
|
rendering `Norway`.
|
||||||
|
- Select a row by its key alone, as the decision "A selector names a row by its key
|
||||||
|
alone" states: `geo.SE.municipality[Lund]` and `misc.territory[Sweden]` select a row
|
||||||
|
today, where the error should name `[1281]` and `[SE]`. Refuse a `name` option beside
|
||||||
|
`key`, which then selects nothing, drop it from the shipped tables, and state the
|
||||||
|
README's selectors and `CHANGELOG.md`'s "a path selects a row by key or name" to match.
|
||||||
- Render selected rows as the decision "A selected row is fixed, not drawn, and an
|
- Render selected rows as the decision "A selected row is fixed, not drawn, and an
|
||||||
unnamed read beside it is refused" states: `New` refuses
|
unnamed read beside it is refused" states: `New` refuses
|
||||||
`{/misc.territory[SE].capital} / {/misc.territory[FI].capital}` today, and a choice
|
`{/misc.territory[SE].capital} / {/misc.territory[FI].capital}` today, and a choice
|
||||||
@@ -227,12 +233,6 @@ by a `data-import/` script, as README goal 12 asks.
|
|||||||
|
|
||||||
### Open questions to settle
|
### Open questions to settle
|
||||||
|
|
||||||
- Decide what a path stepping up and back down renders, per goal 4's writer check:
|
|
||||||
`city[Oslo].country.city.name` could be Oslo or a city of Norway drawn afresh.
|
|
||||||
- Decide whether a route through another row is a second spelling of one result:
|
|
||||||
`city[Oslo].country.name` and `country[NO].name` always render `Norway`, and goal 4
|
|
||||||
refuses a second spelling, while `country[NO]` and `country[Norway]` both select one
|
|
||||||
row today.
|
|
||||||
- Decide whether a goal 5 violation joins the comprehension gate's exception list: the
|
- Decide whether a goal 5 violation joins the comprehension gate's exception list: the
|
||||||
`{/sel}|{/sel}` panic waits behind the whole round at 5.9, and
|
`{/sel}|{/sel}` panic waits behind the whole round at 5.9, and
|
||||||
`{/geo.SE.locality}|{/geo.SE.municipality}` mispairs the shipped data meanwhile, though a
|
`{/geo.SE.locality}|{/geo.SE.municipality}` mispairs the shipped data meanwhile, though a
|
||||||
|
|||||||
Reference in New Issue
Block a user