Skip to content

Support for variation unit identification through combination of "n", "from", and "to" attributes

Compare
Choose a tag to compare
@jjmccollum jjmccollum released this 08 Jan 03:05
· 13 commits to main since this release

Previously, teiphy assumed that each variation unit (i.e., an app element) would be uniquely identified by its xml:id attribute or its n attribute alone. While this assumption holds in the case of xml:id attributes (which, by definition, must be unique), it does not hold for n attributes. In practice, TEI XML collations assign app elements in the same larger passage of text (e.g., a verse) the same n value as that larger passage and then assign the app elements additional from and to attributes specifying word indices, so as to specify the unique location of the variation unit within that larger passage. To this end, the VariationUnit class of teiphy now checks for from and to attributes in addition to an n attribute and combines them to form a unique ID for the variation unit.