Implemented user editing of xml:id attributes for annotations
Previously, the @xml:id
attributes of <zone>
elements (and the corresponding @facs
attributes of annotation <div>
s) were assigned automatically by the program. This is less than ideal, because users (especially sophisticated users) are likely to want to use memorable strings for these attributes, so that they can more easily link to or refer to them from elsewhere in the document, or from other documents. Remedying this deficiency has been on the roadmap for a long time.
I've implemented what I think is the simplest and most reliable approach to editing the ids. First, I had to put in place auto-generation of valid ids when a new annotation is created, so that the id is a property of the annotation itself (rather than just created and used during i/o processes, as before). Next, I added getter and setter routines at the level of TIMTAnnList and TIMTAnnotation, which check for validity and uniqueness. Then I updated the i/o code to ensure that these are being saved and loaded correctly. Finally, I added a simple and unobtrusive GUI method for setting the ids, in the form of a little button on the right of the annotation title. This will not cause much confusion for regular users, and won't change any other functionality, but it's easily accessible when needed.
Initial testing suggests everything is working OK. Now I need to update the screenshots in the documentation.