Skip to content

feat: refactor register-map#337

Open
HelenaSabel wants to merge 1 commit into
mainfrom
fix/register-ids-odd
Open

feat: refactor register-map#337
HelenaSabel wants to merge 1 commit into
mainfrom
fix/register-ids-odd

Conversation

@HelenaSabel

Copy link
Copy Markdown
Contributor

This PR:

  • Adds $config:register-map to the defaults of config.json (and makes the pertinent changes in the schema)
  • Adds this map to odd-global so that it can be accessed from the ODD (before, the IDs to the registers were hard-coded in the TEI Publisher ODD)

@HelenaSabel HelenaSabel requested a review from tuurma April 26, 2026 21:21
@tuurma tuurma self-assigned this May 11, 2026

@line-o line-o left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

[% endif %]

[% if map:contains($defaults, "register-map") %]
declare variable $config:register-map as map(*) := parse-json('[[$defaults?register-map]]');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not need parse-json here. And because this is a feature specific to the register profile, the setting should probably go into features.register, not defaults.


[% if map:contains($defaults, "register-map") %]
declare variable $config:register-map as map(*) := parse-json('[[$defaults?register-map]]');
[% else %]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need else here. The default should be in the profiles/register/config.json. This way, you'll also benefit from object merging when extending the profile.

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.

4 participants