MVP: Linking epithets with speeches in Nostromo
I've added new functionality to the stylesheet that builds the serOgraphies.xml
file. As part of the information it gathers on each character, it also pulls out the beginning of each speech (<said>
), and tells you what the nearest <rs>
to that speech is. In other words, it calculates which epithet is most closely associated with each speech. This involved writing a couple of useful functions (hcmc:getTextOffsetBetweenTags
and hcmc:getNearestRsTag
) which will also be useful with the Map of London.
It's currently set to a distance limit of 250 characters (meaning letters/digits/glyphs, not literary characters), so that if there is no <rs>
within 250 characters of the <said>
, no epithet is returned. That distance can be changed easily in the stylesheet.