Marking Up Names: Part 3
My digital edition of Sandall’s History of 5th Lincolnshire Regiment now has a new improved index of people. This uses the Exhibit API to make an interactive list which can be filtered, sorted, and searched. Exhibit provides features that would normally need a database driven back-end but it’s all done on the client side using Javascript. The two disadvantages of this are that it doesn’t scale up very far, and that it isn’t very Google friendly. In this case there’s no problem because there are only ever going to be 350 records in the list, and there is no unique content on this page – it’s just an index to point users to other pages, which are Google friendly.
I’ve also made every occurrence of a name in the text into a link which points to the index. My worries about illegal characters in id attributes turned out to be unfounded. With Exhibit I can use the standardized names from the TEI @key attribute as hashes to make permalinks to individual records. Clicking on the link takes you to the index and displays a dialog box with all of that persons details, including links back to every mention in the text. The dialog box is also displayed by clicking on a person’s name on the index page. I just need to work out a way to display it without having to reload the page.
Exhibit is really easy to use and makes it possible to add some fairly advanced features with surprisingly little effort. It took some searching, copying examples, trial and error, and asking on the mailing list before I worked out how to do everything, but as the project is documented by a wiki I’ve been able to update it whenever I find out how to do something that isn’t already explained there. The JSON data file for my index page is generated automatically by XSLT which loops through every <persName> and <rs> tag in the TEI document, and pulls out extra details (date of death, links to medal cards and CWGC) from another XML file.
Now that person names are more or less fully implemented, it’s time to move on to place names. These should be easier to disambiguate, and with Exhibit I can do some even cooler things with them, such as generating a Google map.

Comment by Ben Brumfield — 4:12 pm, 23 January 2008 [permanent link to this comment]
It looks really good! I especially like the full name expansion in the tooltip when you hover over a name in the text.
The one thing I wish you could change is the presentation of the name’s occurences in the index. This is something I’m thinking about for my system as well: what’s most effective to present? Since my links happen once per page, I’m just using the page title for reference. But there are alternatives: you could present the umpteen characters on either side of the name as a context, to help the reader get to the event they’re interested in.
Comment by Gavin Robinson — 6:45 pm, 23 January 2008 [permanent link to this comment]
Right now I’m working on changing the links from the index to each occurrence so that the text is the chapter title instead of the URL of the occurrence, but that’s not ideal as some names occur more than once per chapter. You’re right that context would be better. Either way there might be a performance hit because of Exhibit’s data model. Their implementation of JSON doesn’t allow the nesting of objects within objects or arrays within arrays, so to match the occurrence URL to the chapter title or text snippet means keeping each pair of values as a separate record in the database. That’s going to push the number of items from 350 to over 1,000 which might slow things down too much (although at this point I’m not sure exactly what the trade-off between number of items and size of items is). Ideally I’d like to include chapter titles anyway so that the index can be filtered by chapter. I’ll be experimenting with it tomorrow so I’ll see how it goes.
Comment by Gavin Robinson — 12:52 pm, 24 January 2008 [permanent link to this comment]
I’ve uploaded a new version with chapter titles. It doesn’t seem to be any slower than the old version. Introducing extra items for references and chapters (and being merciless with white space!) actually allowed me to save a lot of space in the data file – it’s now only 75K. If I add text snippets now it won’t add any more records to the database and probably won’t take the file above 150K. Now I just have to work out how to do it…