-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
We currently rely on the assumption, that the mets:div content element contains an @ADMID (which is mandatory by METS DFG application profile, but optional in the ENMAP profile):
mets-mods2tei/mets_mods2tei/api/tei.py
Lines 828 to 837 in 47f5bc2
| # descend to the deepest AMD | |
| while div.get_ADMID() is None: | |
| self.logger.debug("Found logical outer div type %s: %s", div.get_TYPE(), div.get_ID()) | |
| div = div.get_div()[0] | |
| start_div = div.get_div()[0] | |
| self.logger.debug("Found logical inner div type %s: %s", start_div.get_TYPE(), start_div.get_ID()) | |
| while start_div.get_div() and start_div.get_div()[0].get_ADMID() is not None: | |
| self.logger.debug("Found logical inner div type %s: %s", start_div.get_TYPE(), start_div.get_ID()) | |
| div = start_div | |
| start_div = start_div.get_div()[0] |
Since this is fragile and inflexible, the parser should probably search for @TYPE and @ID (perhaps cross-checking with structlink) instead.
Metadata
Metadata
Assignees
Labels
No labels