A Tinderbox document has two basic kinds of structure: one is the structure formed by links between notes. The other is the hierarchical structure of the document. A Tinderbox note can contain other notes, which can contain other notes, and so on. The notes can thought of this as chapters containing sections containing divisions; or topics containing sub-topics; or in any way that fits the user's workflow.
Several terms are used to describe relationships within a hierarchy:
- parent: the item one level up. A parent note contains one or more child notes (children), and thus contains one or more levels of sub-notes. A parent note may also be referred to as a 'container' as is contains other notes. ('parent' designator)
- siblings: items that have the same parent. ('firstSibling', 'prevSibling', 'nextSibling', 'lastSibling' designators)
- child: an item one level down. In Tinderbox, when a note contains other notes, those notes are its children. A child note is thus any note that has a parent note, i.e. it is not a top level note. ('child', 'lastChild', 'randomChild' designators)
- descendant: a child, or a child of a child, and so on.
- ancestor: a parent, or a parent of a parent, and so on.
- grandparent: specifically the parent of a note's parent. ('grandparent' designator)
- root: the item that has no parent. In a Tinderbox document, the document as a whole is the root: it contains the top-level notes, and nothing contains it. Root level notes have $OutlineDepth of 1.
- cover: the top level note. If more than one root-level note, the cover it the oldest sibling. ('cover' designator).
In the image, notes named as for designators are in red. Note that designators are case-sensitive when used in export/action code; by convention designators are normally not quoted in action code, although they are strings.
There are several group terms to describe Tinderbox notes:
- all: all notes in the current TBX file. ('all' designator)
- ancestors: all ancestors. ('ancestors' designator)
- children: all children. ('children' designator)
- descendants: all descendants, i.e. all children and their children. ('descendants' designator)
- sibling: all siblings. ('siblings' designator)
Any note containing other notes is a 'container'; put another way, a container is any note that has children/descendants. Agents are a special class of container, holding an alias to every note matching the query stored in their $AgentQuery attribute.