I've implemented a metadata display system that works like this:
- In text documents, a menu item "Métadonnées" is added.
- Below the menu, a hidden div contains metadata.
- Clicking on the menu item hides and shows the div. There's also a little X in the top right of the div which closes it.
- The div contents are generated from the teiHeader.
- Each node or text element in the header is processed. In the case of a node, a div is created, and the node's local-name() is used to look for a possible caption in a specially-configured variable in the project_globals.xsl. If a caption exists, it's used as a label.
- In the case of text, it's simply output as text.
- The encodingDesc node is filtered out, because anyone interested in that information will most likely prefer to see it in full, in the XML itself, while to others it will be confusing.
We have a couple of problems that should be resolved ASAP:
- Our metadata is currently a blend of English and French. It should all be converted to French, I think.
- Some metadata is irrelevant or unnecessary ("An Electronic Edition", or the
<extent>
tag), and should be removed. - Some headers are more complete than others.
However, this should encourage us to go back and look again at our headers.