Working on a custom sort for the titles in TOCs
John has expressed a desire that the TOC pages display the article titles sorted alphabetically, but without the articles included. We now have a way to approach this, using a custom sort comparator written in Java, as we've done for the Moses sort. I wrote a comparator which strips articles before comparing titles, and tested it with JUnit tests, then uploaded it to the Cocoon WEB-INF/lib
directory and restarted Cocoon. Then I came up against the same problem as I had with Moses: the XSLT is all version 1.0, so Saxon 8 isn't appropriate for it. I did a bit of testing with by creating test pipelines using 2.0 versions of the files, but nothing works properly (XIncludes are not XIncluded, and the sort doesn't appear to work either). If this sort is really important, and can't be achieved simply by adding a new version of the title to each document, then we'll have to rewrite all the XSLT, but it doesn't seem worth it at the moment. The comparator will be very handy later when we work on teiJournal, which will need it, so it's not wasted work.