More planning for version 1.8
I had assumed that the decision to link an annotation using @facs
or @corresp
, depending on the "transcriptional" setting of its category, would be a simple one, but it turns out to be slightly more complicated than I had hoped. Ironically, this is because I have good object-orientated code with separation of concerns; annotations write themselves to the output document, at the behest of their annotation list, and neither they nor their annotation list know anything about the category object except its CategoryID
, which is known to the annotation list object. Therefore the neither the annotation nor the annotation list which manages it have any way to know directly whether @facs
or @corresp
should be used.
When we're reading documens back in, this is no problem; the annotation can check for @facs
, and if it's not there, check for @corresp
. I already have that code written and working. The problem is only in writing out the files. I really don't want to undermine the clean separation of the objects, so I'll probably have to create some kind of callback function that the annotation list can use to query the category, to find out what kind of thing it is.
An added complication, though, is that there is no useful place to store the category's type (transcriptional or not) in the <rendition>
element which is used to store category information. My (rather vague) plan had been to have the category infer its own nature by looking at the attribute used by annotations linked to it, but this is actually a bit circular, and even if it worked, it would leave us in a situation where we couldn't save the state of this boolean without there actually being an annotation in that category. That's obviously unacceptable; documents are regularly saved with categories that don't yet have annotations in associated with them, and we can't afford to throw away category data when this happens. So I'm going back to the drawing board (or the TEI schema).