Hard slog with XSL:FO
Re-configured the XSL:FO output XSLT to take account of three possible levels of attribute-sets in the database (base, styleguide and user). Then I started the long task of writing the XSLT output code. I got a long way into it -- all the basics should be covered -- but I couldn't get anything to render correctly from FOP; the page layout and numbering worked, but the body document wass simply unstyled. After an hour of hacking, I finally determined that this was caused by the accursed browser cache; switching browsers threw up a page that looked half-way ready.
I still have a lot of not-quite-right attributes in my output, according to the unofficial FOP a schema I've downloaded; it tells me I need to get rid of rogue xsl:use-attribute-sets attributes that have found their way out into my code instead of being interpreted; it also tells me I must use units where values are 0 (so 0 is wrong, but 0in is correct); and it also tells me that hash expressions of colour values are wrong. I'll work on these, and see if I can get more stuff to work properly tomorrow.