Skip to content

Citation scheme/style models + CSL mapping + flavour parity + JSON Schema + atlas inventory - #76

Open
ronaldtse wants to merge 3 commits into
mainfrom
flavour-parity-and-schema
Open

Citation scheme/style models + CSL mapping + flavour parity + JSON Schema + atlas inventory#76
ronaldtse wants to merge 3 commits into
mainfrom
flavour-parity-and-schema

Conversation

@ronaldtse

@ronaldtse ronaldtse commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

The full TODO.cc-citation build (items 02, 03, 06, 07, 08, 10 core):

07 - Citation scheme/style/index/style as MODELS (flagship)

  • citation/ module: 14 LML models - CitationScheme (system + disambiguation + name form + localized strings), CitationStyle (scheme + templates + per-type template map + sort rules), BibliographicIndex (entries + collation + grouping), BibliographicStyle (index + layout); CitationSystem enum (ISO 690 Annex A: name-date, numeric, named-tag, running-notes, implied); DisambiguationRules, NameFormRules, LocalizedStrings, TemplateMap, TypeTemplate, SortRule, CollationRules, GroupingRule, LayoutRules
  • Four diagram views rendered; parity + lint green
  • First style instance: citation/styles/iso-690.yml - ISO 690 name-and-date as data, validated against the schema generated from the LML (fixtures:schema)
  • The mission loop proven end to end: model -> schema -> instance -> gate

08 - CSL subset mapping + gate

  • mapping/csl.yaml: 35 CSL type to BibItemType, 57 variable to attribute (with wire forms), 8 documented downgrade losses - CSL is a lower-level subset of ISO 690/Relaton, imports downgrade, never extend
  • tools/validate_csl.py: every mapping target must exist in the generated schema; rake csl wired into CI - the mapping cannot drift from the models

02 (complete) - Flavour vocabulary parity

19 vocabularies gated (5 base + 14 flavour DocumentType overlays), kebab-fold comparison tolerating wire/LML spelling. Caught and fixed: bsi/iso camelCase, ieee missing 5 wire values, gb out-of-wire values, itu missing 3, BibItemType missing 4 (electronic-resource, notated-music, performed-music, personal-communication), etsi accent loss

10 (core) - JSON Schema from the LML

rake schema generates relaton/schema/bibitem-2020-12.json (377 definitions: classes with cardinality + inheritance, enums, open marker classes for polymorphism). rake fixtures:schema validates YAML fixtures + style instances. CI asserts the committed schema is fresh

06 (complete) - Atlas inventory page

/inventory.html: every module's types with attributes/values, machine-generated, linked from primary navigation

03 (partial) - ISO 690 gaps

Edition.audience, printer + sponsor roles; fixture exercises both

OCP proof

The citation/ module was added with zero code changes to any gate: Rakefile tasks, parity, lint, site, schema, inventory all discovered it by globbing

Test plan

  • rake check fixtures - lint 378 types / 32 modules, parity 19 vocabularies, 65 PNGs, XML + YAML + schema + CSL gates
  • ISO 690 style instance validates against the generated CitationStyle schema
  • Atlas 47 pages, 0 broken refs, 4 new citation-model cards
  • CI green

- Vocabulary parity extended to 14 flavour DocumentType overlays
  (kebab-fold comparison tolerating wire/LML spelling differences incl.
  spaces, underscores and accents). Drift caught and fixed: bsi/iso
  camelCase, ieee missing five wire values, gb out-of-wire values, itu
  missing three (handbook/question/contribution), BibItemType missing
  four (electronic-resource, notated-music, performed-music,
  personal-communication), etsi accent loss in Norme Europeenne.
- TODO 10 core: tools/generate_schema.py emits
  relaton/schema/bibitem-2020-12.json (363 definitions - classes with
  attribute cardinality and LML inheritance, enums, open marker classes
  for polymorphism); tools/validate_schema.py validates the YAML fixture
  against it; rake schema + fixtures:schema wired into both CI
  workflows, CI asserts the committed schema is fresh
- TODO statuses updated (02 done incl. flavours, 09 stage A partially
  realized, 10 core done)
* main:
  Advance basicdoc to the ontology-completion tree
TODO.cc-citation items 06-08:

07 (models + first style):
- citation/ module: 14 LML models - CitationScheme (system +
  disambiguation + name form + localized strings), CitationStyle (scheme +
  templates + per-type template map + sort rules), BibliographicIndex
  (entries + collation + grouping), BibliographicStyle (index + layout);
  CitationSystem enum (ISO 690 Annex A: name-date, numeric, named-tag,
  running-notes, implied); four views rendered; parity + lint green
- citation/styles/iso-690.yml: the ISO 690 name-and-date scheme as DATA,
  validated against the schema generated from the LML (proves the loop:
  model -> schema -> instance -> gate)

08 (mapping + gate):
- mapping/csl.yaml: 35 CSL type -> BibItemType, 57 variable -> attribute
  (with wire forms), 8 documented downgrade losses. CSL is a lower-level
  subset of ISO 690/Relaton - imports downgrade, never extend
- tools/validate_csl.py: every mapping target must exist in the generated
  schema; wired into rake csl + CI (gate: the mapping cannot drift from
  the models)

06 (complete):
- Atlas /inventory.html: every module's types with attributes/values,
  machine-generated from the LML, linked from primary navigation;
  inventory.json also emitted

The citation module is pure addition - the Rakefile, parity, lint, site,
schema, and inventory all discovered it without code changes (OCP proof).
@ronaldtse ronaldtse changed the title Flavour vocabulary parity gate + JSON Schema generation from the LML Citation scheme/style models + CSL mapping + flavour parity + JSON Schema + atlas inventory Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant