Better CALS in DocBook
The DocBook xslTNG Stylesheets version 2.8.0 have better (and faster) CALS table processing.
Inspired by Frank Steimke, I’ve refactored the way CALS table processing works in the DocBook xslTNG Stylesheets version 2.8.0. In addition to being substantially faster (roughly 3x faster on the monster table test case), all of the output format agnostic processing has been moved into a preprocessing phase.
The output format doesn’t have any bearing on the semantics of the CALS table itself. The preprocessing phase makes all of the complicated forms of inheritance in the table model explicit on the entries. It adds a few extension attributes where necessary. In principle, this bit of processing could be refactored so that it’s entirely separate from DocBook, but I haven’t done that. There’s still a little bit of DocBook-specific markup in there, for example, there are some processing instructions that the DocBook stylesheets recognize.
In addition to being faster, this will make it easier for folks writing customization layers to generate different output formats: XSL FO, for example, or one of the office formats.
There are some (small) backwards incompatibilities in this update, but they appear to be the result of bugs that existed in earlier versions:
- A
rowsepattribute specified on acolspecwas not always handled correctly. - The
rowsepandcolsepsettings on ancestor elements were not inherited byentrytblelements in the table. Reviewing the CALS Table Model specification offers no reason to believe that they shouldn’t be inherited.
I changed the markup for a couple of tests so that the output remained the same.
If you have complex tables, review them carefully after you upgrade to version 2.8.0. If you see anything that looks wrong, please report it.
If you have customization layers that change any aspect of CALS table processing, you’ll almost certainly have to update them for version 2.8.0. Hopefully, the customization will be simpler!