Skip to content

Update CMIF v2 export and add language information#614

Merged
SteffenAstheimer merged 6 commits intodevelopfrom
update-cmif
Apr 2, 2026
Merged

Update CMIF v2 export and add language information#614
SteffenAstheimer merged 6 commits intodevelopfrom
update-cmif

Conversation

@peterstadler
Copy link
Copy Markdown
Member

@StefanDumont pointed me at the new feature of providing language information for a letter within CMIF v2.
Although documentation seems to be lacking so far (I couldn't find any at https://encoding-correspondence.bbaw.de/v1/CMIF.html#c-4-2), Stefan pointed me at https://gams.uni-graz.at/context:hsa/CMIF where this feature is already successfully introduced.

Also I added a small fix for preventing multiple dates which the CMIF check complained about.

for creating CMIF v2 relations
as per email conversation with @StefanDumont who provided https://gams.uni-graz.at/context:hsa/CMIF as an example. Documentation seems to be lacking, though.
@peterstadler
Copy link
Copy Markdown
Member Author

How I tested my changes:

  1. I did a diff of the dev branch vs. this branch for http://localhost:8080/exist/apps/WeGA-WebApp/cmif_v2.xml
  2. I checked the new output with CMIF Check

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the CMIF export logic (CMIF v2 in particular) to include language information for letters and to address CMIF validation complaints about multiple dates in a single context.

Changes:

  • Suppress duplicate <tei:date> elements during CMIF transformation (attempting to satisfy “single date” constraints).
  • Add CMIF v2 language relations derived from tei:langUsage/tei:language.
  • Introduce a small helper (ct:cmif2-ref) to centralize creation of CMIF v2 <tei:ref> relations and refactor existing relation construction to use it.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

peterstadler and others added 2 commits March 20, 2026 16:19
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…` that would actually be emitted

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@SteffenAstheimer
Copy link
Copy Markdown
Contributor

Works fine, many thanks!

@SteffenAstheimer SteffenAstheimer merged commit 1e9e0d4 into develop Apr 2, 2026
2 of 3 checks passed
@SteffenAstheimer SteffenAstheimer deleted the update-cmif branch April 2, 2026 13:26
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.

3 participants