Five unfinished documents have been removed from the DB so they don't show up on the site. I've also moved them out of my xml\texts
folder, and put them into xml\unfinished
, so future updates don't upload them again by mistake.
Wrote the XSLT for testing whether there's a truncated title available or not, and using it; if there isn't, the original truncation algorithm still runs on the main title. The code occurs in two places, once for the doc list and once for the thumbnail image that pops up when you click on the title; each could be handled differently if necessary.
Added some detailed licensing info to the Welcome page, pointing at the Creative Commons licence, and also added attribution to the BN at the bottom of every image (by adding it into the XSLT that generates the image pages).
Claire will send me shortened versions of titles where required, with normalized case (probably sentence case), and I'll add a new title element in the header, inside the <biblStruct>
element used for indexing in the TOC, like this:
<title type="trunc">Arrest contre les chastrez</title>
The TOC XSLT will then look for that element, and use it if it's there; failing that, it will use the main title.
Met with Claire to discuss the site. She'll send over some text about the licence terms (it's a Creative Commons one, as we've discussed before), as well as something to act as a disclaimer on the site, noting that it's a long way from finished and some texts are incomplete.
The title problem is actually in the title bar of the thumbnail window; when the titles of engravings or texts are long, they wrap too many times and the gradient fill graphic isn't large enough to fill the title bar area, resulting in unfilled bands under the title. "Fixed" this by changing the XSLT to invoke the truncation template so that long titles are truncated for the thumbnail window, just like they are for the document list. Tested on a range of browsers - seems OK, unless you make your font size so large that the same problem occurs even with short titles.
Could you tell me what's incorrect about those document titles? The site is just using the titles from the documents themselves, truncated so the page displays in a usable manner. Quite a while ago we discussed the possibility that you might add short-and-user-friendly titles for each of the documents (with regularized capitalization), but that's not been done yet, so we're stuck with the title as it is in the document. Some of them are virtually of paragraph length, so of course they have to be truncated for the purposes of the document listing. If that's all the problem is, then all we need to do is get you to add a new display title to each document. If there are typos of some kind in the titles themselves, then you just need to fix the XML code in the documents.
I've just discovered that XSLT 2.0 allows you to define your own functions -- info and examples here. Saxon 8 supports this (details), so we should definitely try it out. I could create a function which strips off the leading article and puts it somewhere else, and call that function, passing it the title of the document, both as the sort key and as the rendering instruction, so that we'd get articles sorted according to titles without leading articles, displayed in the same way. This should definitely be part of teiJournal's code.
I've been a bit unhappy with the way the document list looks, so I revisited it today. For the ScanCan project, I've written a Java sort comparator which ignores leading articles when sorting text strings. This seems a promising approach for our document list, so I added French articles to the mix, and tested it. You have to allow for the following prefixes (quotes included to show spaces):
- "THE "
- "A "
- "AN "
- "LE "
- "LA "
- "LES "
- "L'"
- "L’"
remembering to include both varieties of apostrophe. I'm assuming I shouldn't be allowing for "un" and "une" -- correct me if I'm wrong!
Right now, the output just SORTS according to these rules; it doesn't remove or move the leading article from its place. If this were an English project, I would add code to the XSLT to complement this, so that the article would be removed to the end of the title, like this:
The Unfortunate Traveller becomes Unfortunate Traveller, The.
I don't know whether this is commonly done in French, or what the rules are for doing it, so I've refrained for the moment.
I also added a class "EvenRow" to the even-numbered rows of the output table, so that CSS can be used to give the rows an alternating background colour; this will make it easier to disentangle the documents visually. Greg is adding the colours to the stylesheets now.