so

Better CALS in DocBook

Volume 10, Issue 21; 27 Apr 2026

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:

  1. A rowsep attribute specified on a colspec was not always handled correctly.
  2. The rowsep and colsep settings on ancestor elements were not inherited by entrytbl elements 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!

#DocBook #MarkupMonday #XML

Please provide your name and email address. Your email address will not be displayed and I won’t spam you, I promise. Your name and a link to your web address, if you provide one, will be displayed.

Your name:

Your email:

Homepage:

Do you comprehend the words on this page? (Please demonstrate that you aren't a mindless, screen-scraping robot.)

What is six times three?   (e.g. six plus two is 8)

Enter your comment in the box below. You may style your comment with the CommonMark flavor of Markdown.

All comments are moderated. I don’t promise to preserve all of your formatting and I reserve the right to remove comments for any reason.