Naming

How a schema spells its attributes, the other spellings it accepts, and the names it may not declare.

On this page

#Names

An attribute name is a lowercase hyphenated identifier: x-domain, show-grid, text-size. Source is forgiving — attribute keys match case-insensitively, and runs of whitespace fold to a single hyphen, so an author may write x domain — but the declared name and every alias must be strict identifiers, with no spaces.

Australian spellings are canonical — colour, centre, grey — with the American form supplied as an alias, never the reverse.

A unit never appears in a name. The type carries it: a duration attribute is duration, typed so that 500ms and 3s both parse — not duration-ms.

Suffixes have settled meanings: -format names what an axis holds (x-format: radians), -scale how it places a value (x-scale: log), -style chooses among fixed looks (grid-style: dots), and paired axis attributes share the x-/y- prefixes. Enum values follow the same casing as names: lowercase, hyphenated (equal-earth, lines-minor).

#Aliases

The canonical name is the full, unabbreviated, Australian-English spelling. Aliases hold the forms an author will plausibly type instead: the American spelling (colour aliases color), abbreviations (show-background aliases background, show-bg, bg), and near-synonyms (endpoints aliases dots).

An alias is a spelling, not a second identity: examples and documentation use the canonical name only.

#Reserved and derived names

No construct declares an attribute named id. Identity is head syntax — point#p1, read back through #p1 references — and the name is reserved for it.

Derived attributes — the read-only values a construct publishes, like #fit.slope — live in the separate derived map, never as flagged entries among the attributes. Each declares a type like any attribute; a derived name colliding with a declared one is a schema error, and writing one from source is a compile error.

Last updated