Log in

HCMC Journal

LEMDO 2024-04-15 to 2024-04-19

to : Martin Holmes
Minutes: 730

On Monday, started work on the overlap code. Initially I was stymied by a limitation of the XSpec tests I’d begun writing before, because it seems impossible to present a block of input XML in the form of a document-node(), which is what the input to the XSLT needs to be in order for the accumulators and other templates to work properly. Eventually, I gave up on this; I think I’m going to have to write tests which are run externally instead of using XSpec in this case. When I started working with a conventional process taking an input file and producing an output file, I got everything working, and the initial results are good, for the small test I have. I got half-way through the process which will add the new explicit annotation and collation links.

On Tuesday, I made significant progress; first I got the annotation and collation link insertion working, and then tested this with a full original document. Then I started working on how the process might be called using fn:transform from the existing modules. I created a driver file for testing, and after much experimentation, ended up ditching the special overlap mode I had been using in the process in favour of the default mode, because I could not find a way to correctly pass the initial-mode parameter to fn:transform. We don’t actually need a distinct mode; the default mode is fine because this transformation is in any case isolated from all the prior and subsequent transformations. By the end of the day it was working, and I believe it’s significantly faster than the original implementation. Also we had a LEMDO team meeting.

On Thursday, I added a testing parameter to the build process, so that I can easily follow alternative paths through the build when I need to, without disrupting the main builds. This works nicely. I then continued working on the new overlap stuff, and got it to the point where it exactly reproduces the output we have now, with the exception that the marginal line for annotations applying to blocks is now gone; instead we have inline elements, so long runs of inline text are underlined. This, combined with the CSS which double-underlines any run of text with multiple annotations associated with it, allows us to see the true nature of the nested-and-overlapping-annotation issue, and we can now discuss the proposed solution (a note icon that functions like the collation icon) and decide if it’s what we really want. By my calculations, the new process shaves at least 12% off the createXhtml build phase for these texts, and since there are 163 of them, I think we’ll see a noticeable reduction in overall build time.

On Friday, ran the plan past NH and JJ one more time to confirm we’re OK to proceed, and then pushed on with the implementation, adding a new icon for comments, and adding new material to the JS and CSS to update the behaviour and appearance in the rendered page, being careful to keep the old code in place as well in case we need to roll back. By the end of the day, I had everything working as expected, with only two more CSS changes to accomplish, which I’ll do next week.