Being in a frantic rush to finish and submit some documents, needing a way to format them with XSLT, and wanting to push things forward on the free software front, I decided to tackle some tricky problems using XSLT 2.0.
I spent the better part of a week solving problems specific to the author-year citation style typical in the social sciences.
How to handle:
Doe, John (1999a) ...
———. (1999b) ...
———. (1999c) ...
Doe, John and Jane Smith (2000a) ...
Doe, John and Jane Smith (2000b) ...
… where the suffix is generated as part of a temporary tree operation, so to ensure it is the same in the bibliography and in the citation.
Note: no, it is not a mistake that multiple authors do not have the same handling as single authors!
Here’s an XSLT 2.0 stylesheet to render DocBook NG with MODS embedded in the db:bibliography element, ultimately (when finished!) according to the demands of the Chicago Manual of style, and my discipline’s flagship journal.
The seemingly simple example above it a huge PITA, particularly with multiple namespaces and modes!
I’m more convinced than ever that the XSLT recursive processing model is ideally suited to doing bibliographic formatting; at least along with the grouping functions in v 2.0.
Alas, as I say in the archive README, some of this stuff needs to be imported back into BiblioX, which is too complex for me to modify. There is a really desperate need to solve the problems of bibliographic formatting in XML, which is ideally suited to this sort of stuff, yet sorely lacking on the implementation end. If you have an interest in this and XSLT skills, please consider contributing.