Update CMIF v2 export and add language information#614
Merged
SteffenAstheimer merged 6 commits intodevelopfrom Apr 2, 2026
Merged
Update CMIF v2 export and add language information#614SteffenAstheimer merged 6 commits intodevelopfrom
SteffenAstheimer merged 6 commits intodevelopfrom
Conversation
that where flagged by CMIF Check at https://correspsearch.net/de/cmif-check.html
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.
Member
Author
|
How I tested my changes:
|
Contributor
There was a problem hiding this comment.
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.
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>
Contributor
|
Works fine, many thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@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.