Text Names in Name Paths
Text names appear in name paths when a section or value is identified by a double-quoted string — as described in Text Names. This feature is typically used in user-facing configuration files to allow full phrases or human-readable keys as section names.
Sections with text names are limited: they cannot contain subsections. As a result, in configuration files, any section with a text name always forms the final component in a name path.
Example
The following configuration defines several book
sections, each identified by its title:
[book."UNIX and Linux System Administration Handbook"]
ISBN: "978-0134277554"
pages: 1232
edition: "5th (2017)"
[book."The Practice of System and Network Administration"]
ISBN: "978-0321492661"
pages: 1056
edition: "2nd (2007)"
[book."Essential System Administration"]
ISBN: "978-0596003432"
pages: 1176
edition: "3rd (2002)"
This configuration produces the following value tree:
● (root) <== Document ( size=1 )
└── [book] <== SectionWithTexts ( size=3 )
├── ["Essential System Administration"]<== SectionWithNames ( size=3 )
│ ├── edition <== Text ( "3rd (2002)" )
│ ├── isbn <== Text ( "978\u{2d}0596003432" )
│ └── pages <== Integer ( 1176 )
├── ["The Practice of System and Network Administration"]<== SectionWithNames ( size=3 )
│ ├── edition <== Text ( "2nd (2007)" )
│ ├── isbn <== Text ( "978\u{2d}0321492661" )
│ └── pages <== Integer ( 1056 )
└── ["UNIX and Linux System Administration Handbook"]<== SectionWithNames ( size=3 )
├── edition <== Text ( "5th (2017)" )
├── isbn <== Text ( "978\u{2d}0134277554" )
└── pages <== Integer ( 1232 )
Each book
entry is uniquely keyed by its title. The metadata fields — isbn
, edition
, and pages
— are stored directly inside each of these leaf sections.