LEMDO 2024-07-02 to 2024-07-05
to : Martin Holmes
Minutes: 230
Over the long weekend, worked on the problem of the build requiring access to the TEI website to use the Stylesheets when building the documentation. This has been a weak point for a long time, but is especially problematic given the rather flaky uptime of the TEI site recently. I added a new build target which checks for a local version of the code, and only downloads a new version (Stylesheets from the latest release on GitHub, p5subset from the TEI site) if there is no local version yet. That means that most of the time it will never need to depend on the external resources, but we can also update/refresh the local copies whenever we need to or there is a new release. That was issue #45, now closed.
On Tuesday and Wednesday, debugged some build breaks.
On Thursday, started on an XSLT module which will form part of the transformation which converts a lemdo-dev text into an anthology text. This module has one purpose: to detect situations in which collation and/or annotation markers are followed immediately by closing punctuation, and to move that punctuation to the left of the markers. That involves:
- Detecting a situation in which one or more markers are directly followed by punctuation in the next text node in document order, and copying that punctuation into the output ahead of the markers.
- Detecting the corollary situation, which is when a text span beginning with punctuation occurs immediately after markers, and removing the punctuation.
One particular difficulty is that many of the text nodes in question will not be direct siblings of the markers; they may themselves be inside span elements which are pointed at by other annotation and collation markers. In this case, it will be necessary to construct a copy of the parent span or other element, minus any id, and wrap the newly-located punctuation inside it. There are many more similar potentially problematic scenarios waiting.
That’s why this code is in a separate module; this enables us to write specific texts for it reproducing the most complicated potential scenarios, and work them out with XSpec outside the context of the anthology transform in which they will ultimately be embedded.
I did a full implementation against some XSpec tests initially, and all went well, so I rolled it into the anthology build. However, I’m aware of two cases in 1HW where text is being reiterated for some reason I can’t figure out; I’ve added XSpec tests using exactly the code in the source page, but those tests are passing running XSpec in Oxygen; it’s possible we’ve hit an obscure bug in the relatively old Saxon that the LEMDO build is using. This needs more investigation.