KeshavSoft / definitions
Chapter 03 · One real example

Let's follow table.bodyOnly.

Instead of jumping between files, start with the name and read the definition from the outside in.

CONTROLtableThe control family
→
VARIATIONbodyOnlyThe particular table form
"table": { "bodyOnly": { "baseFromSpec": "tableBodyOnly", "instructions": [ "buildBody" ], "options": { "serial": { "showSerial": "serialChild" } } } }

Now read its contract

1. Starting point

baseFromSpec is tableBodyOnly. The definition names the base spec to start from.

2. Instructions

The list contains only buildBody. That is the instruction named by this variation.

3. Options

The options describe a serial feature, with showSerial pointing to serialChild.

4. The whole meaning

This is a table variation named bodyOnly, described using the same three-key contract as every other variation.

Notice what we did not need to do: we did not need to understand every other table variation before we could read this one. Its identity and its contract are visible right here.

Compare it with table.simple

The family stays the same. The variation changes. The contract stays the same. Its values tell a different story.

"simple": { "baseFromSpec": "tableSimple", "instructions": [ "buildColgroup", "buildHeader", "buildBody" ], "options": { "search": { ... }, "serial": { ... }, "options": { ... } } }

The abbreviated option values above are shown only to highlight the difference in the definition; the full values remain in definitions.json.

← Previous: The contractNext: Read the JSON →