Finished the (first version of) the apparatus app
The Apparatus app is now working; it can read a simple Collate file and output a complete, valid TEI file. I'm still waiting for a bit of feedback from the TEI list on how exactly the <app> tags should be included in the separate apparatus file; I wanted to put them into a div, but they can only appear at a lower level, so right now I'm putting them inside a pointless <ab> tag.
Looking at the other collations (I've been working mainly with the first, LDev003), I see that they're more complicated than the first:
For instance (working with the regColl version (which is the simplest to use), in LDev003 we see something like this:
<l n="1"> <l n="2"> yt ] / added LDev145-TM1039-TP1162.txt <l n="3"> <l n="4"> <l n="5"> they ] thy LDev145-TM1039-TP1162.txt LEge20.txt
meaning that nothing happens till line 2, then we have one addition in one of the witnesses; then nothing till line five, when we have a slight difference in the two witnesses. My app can happily deal with this.
However, if I look in LDev004, I see something like this:
<lg n="1"><l n="1"> <lg n="1"><l n="2"> that whyche ] the thing that STC_24650.5_05 STC_26053.5.3 <lg n="1"><l n="3"> hathe in ] omitted STC_26053.5.3 <lg n="1"><l n="4"> but ] And STC_24650.5_05 STC_26053.5.3
In other words, line-group signals are included along with line signals. Now, these seem to be superfluous, in fact, because line numbering is consecutive through the poem, so line numbers are all we need for reference. Therefore the simplest solution might be just to strip out all the line-group signals before processing. However, I'll have to take a quick look through the remaining files before I know for sure if this is reliable or not.
I also tested the app on Ubuntu, where it works fine after installing Java 1.6. (OSX is out until Apple gets its VM up to version 1.6). Played around a bit with the Look and Feel settings to see what's available -- not much, really, except that on Ubuntu, as a user, you can force the app to use GTK widgets, which makes it look more like a normal application. I learned a bit about cursors and JFileChoosers too. This has been well worth doing from the point of view of learning Java, irrespective of the use for this project specifically.