Name handling basically done
Posted by mholmes on 18 Apr 2007 in Activity log
I've written the output code to handle names, linking to their references in the name list. To do this, I first made three small edits to one poem in the transcription document, to add the appropriate key attributes to the <name> elements, pointing at the xml:id attributes of the <person> elements in the header. I've made no other changes to the name elements, leaving the current text of those elements unchanged (see my previous message). These changes enabled me to work on the output code for a specific poem.
This is what now happens with name elements:
- When the XML document for a single poem is being generated, the XQuery code looks for each
<name>element in the code, and for each distinct value of theirkeyattribute, it retrieves the appropriate<person>element from the names file in the database. It includes this list of<person>elements in the header of the poem's document. This means that the XML view of each poem is complete and internally consistent (in other words, each person mentioned is fully documented in the header). - When the HTML view is created, each
<name>element is turned into a bold, clickable span. It has a tooltip which consists of a the short form of the bio, and if you click on it, a full bio pops up. - The full bio contains most of the information in the names database. There are some items that aren't yet in there (such as
<genName>elements, andnotBeforeandnotAfterattributes) because I'm not really sure how best to present them. Those are simple tweaks to make. - If there's a DNB reference, it's turned into a link to the DNB entry.
- If there's an LOC reference, it's displayed as text. I don't know how or if it's possible to link to the LOC information online -- any ideas?
The sample poem which works is here. Let me know if this is along the right lines, and if you have any suggestions for the issues mentioned above, let me know.