Week Beginning 4th May 2026

This was a four-day week as Monday was a bank holiday.  I spent most of Tuesday and Wednesday continuing to work on the DOST Auld Laws project, working with the XML files.  The XML files generated by Transkribus and exported by the tool as TEI XML contained many elements that were not valid TEI elements, such as the custom <Aitken> element that had been applied to notes added by A J Aitken.  My first task of the week was to write and apply transformations to the XML files to convert them into fully valid TEI.  I achieved this using XSLT, which is a language I find very unintuitive and frustrating to work with, no doubt exacerbated by the fact that I don’t work with it very often.  I struggled to get any transformations to run initially, and ended up turning to AI to figure out why my scripts were not working.  In this instance AI proved to be extremely useful as it identified what the problems were (e.g. I hadn’t declared the correct namespace or used it when writing the rules) and really helped me to understand how everything fitted together.  I still wrote the bulk of the code myself, but AI was very helpful in identifying errors or issues.  By the end of Tuesday I had generated (and checked) a collection of TEI files that successfully validated in Oxygen, which was a good milestone to reach.

On Wednesday I then worked on the front-end for the project, figuring out how to transform the valid TEI XML into HTML for display in the ‘text and image’ and ‘text only’ views of document pages.  As this was once more using XSLT I enlisted the help of AI to figure out specific issues that I was unfamiliar with.  The biggest of these was how to pick out and process one single page from a document’s XML file based on the <pb/> element.  I had no idea how to achieve this, and despite this being a fairly fundamental issue when processing TEI documents I didn’t manage to find any useful information online.  However, AI came up with a solution (and equally importantly an explanation) in a few seconds and I was then able to incorporate this into my code, transforming the contents of one page, whose ID was passed to the XSLT script as a parameter, to HTML with a variety of styles applied to the various elements.

I also updated the ‘click on a line in the image’ feature, and it’s now possible to deselect the line if it’s already selected – previously once you’d highlighted a line you couldn’t get rid of the highlighting, only move it to a different line but now if you press on the highlight it’s removed.  The lines are also now connected to the text view – pressing on a line in the image also highlights the corresponding line in the text.  You can also press on a line in the text to highlight it and the corresponding line in the image.

I also updated the height of the text pane so that it matches the height of the image pane and if the text is longer the pane scrolls.  This ensures that if the text is very long it’s still possible to see the image, rather than having the entire page scrolling, which may result in the image not being visible when you’re at the end of the text.  It is how we did things in Books and Borrowing, but having a scrollbar in a section of the page in addition to the browser’s scrollbar can be annoying for some people so I might revert to the previous layout depending on feedback.  Here’s a screenshot showing the transformed text, a highlighted line and some of the formatting that’s been added:

Also this week I continued to work on the Place-names of Armagh project.  I wrote and executed a script that generated Irish grid references and ITM values for all places based on their latitude and longitude, a task that I completed using the ‘GridRefUtils’ scripts as detailed here: https://www.howtocreate.co.uk/php/gridrefapi.php.  I’ve used these scripts before on previous place-name projects and they’ve been hugely useful.  I then ran a further script to generated altitude for the place-names by connecting to the Google Maps API, so we now have complete geospatial data for all of the places (other than the 386 that didn’t include Easting and Northing data in the original spreadsheet).  I also added in a new parish and barony in a different county that one place-name requires, and had discussions with the team about the splitting of analysis data into Irish forms and translations.  Removing the Irish forms from the translation field is going to be rather tricky to automate as the Irish forms often form part of the translation.  It’s looking like I’ll need to automate the transformation of some of these, with the rest then requiring manual intervention.

I also continued working on the redevelopment of the Mapping Metaphor resource to create a combined English and Old English map, something I began last week.  This week I managed to get the combined view of the drilldown of the visualisation working.  The counts represented by the yellow circles also use the combined data, and these are also displayed in the pop-up card, for example, if you select 1K02 Creation and press on the yellow line or circle for 1B Life.  In the combined map there are connections to 6 categories in Life whereas there are 5 in the E map and 2 in the OE map (one of the OE ones is also present in the E map, which is why the combined total is 6).  The combined pop-up card also now lists the number of OE lexemes in addition to the E lexemes, for example “1K02 Creation  1088 lexemes / 127 OE lexemes”.

I still need to implement the combined visualisation view of the search results, and also the card pop-up between individual categories, which is going to take quite some reworking (possible direction changes, combined example lexemes, timeline updates etc).  I’ll hopefully find some time to continue with this next week.

Also this week I processed and added some more images to a few Burns Suppers, had a chat with Garrick Allen about a research project he’s wanting me to be involved with later in the year, and contacted Lindsay Balfour about a proposal she’s writing that will have some technical requirements.  I also made a couple of tweaks to the Thesaurus of Old English website after Fraser go in touch with some suggestions, made some tweaks to the survey popup on the Dictionaries of the Scots Language website, gave some mapping advice to Renu of the HiMuJe Malabar project, and created an alternative version of one of the Anglo-Norman Dictionary’s textbase documents that strips out all Latin text.