DocBook xslTNG Reference

Author: Norman Walsh
Version 1.11.0
Revision history
Revision History
  • 1.11.2, 03 Jan 2023
    • Fixed bug where a missing localization file would cause the transformation to fail.

  • 1.11.1, 08 Nov 2022
    • Fixed a CSS problem and removed some debugging cruft.

  • 1.11.0, 07 Nov 2022
    • Added support for EPUB3 output.

    • Reworked how media objects are processed

      • Reworked how contentwidth, contentdepth, width, depth, scalefit, and scale are handled. Width and height (depth) are now processed independently. The results are supposed to be the same as before.

      • It now makes sense to have both multiple imageobject elements and multiple imagedata elements with an imageobject. (And, analogously, multiple videoobject elements with multiple videodata, and multiple audioobject elements with multiple audiodata inside.)

        • The stylesheets select the first object for which none of the data elements are excluded by $mediaobject-exclude-extensions and then process all of the data elements inside.

          • For images, all of the alternatives are placed in a picture element using source and img.

          • For videos, all of the alternatives are placed in a video element using source unless the $mediaobject-video-element is iframe.

          • For audio, all of the alternatives are placed in an audio elemnt using source.

        • The fallback for audio and video elements is a paragraph that offers download links. This can be configured by overriding the t:audio-fallback and t:video-fallback templates, respectively.

        • Use multimediaparams to specify the controls for audio and vidoe objects. If no parameters are specified, controls will be added automatically. (If you specify any parameters, you are responsible for specifying the controls parameter.)

        • If you have multiple data elements in an object, only the attributes associated with the last alternative are considered when calculating the viewport, alignment, etc. This is (a) consistent with HTML, and (b) at least partly justifiable by the observation that for scalable formats like SVG, it doesn’t make sense to say that the image has a particular height or width. Specify that on the raster fallback image where it makes sense.

      • The actual nesting of divs and spans and some of the class values have changed. Check your CSS.

      • Fixed a bug where the summary accesibility attribute was not always output.

      • Reworked image maps.

        • Simpified the code for computing how calspair coordinates are calculated.

        • Added support for html-rect, html-circle, and html-poly styles. Use units="other" and place the new styles in otherunits. See the calloutlist.005.xml unit test for examples.

      • Changed the $mediaobject-exclude-extensions parameter into space-delimited string so that it’s easier to pass as a parameter. The variable $v:mediaobject-exclude-extensions is a list constructed from the string.

      • Added $mediaobject-video-element parameter.

      • Changed f:parse-length() so that it accepts xs:string? and returns an empty sequence if it’s passed one.

      • Added support for db:textdata. If a text data element is present, the first one encountered is used (unless it contains only a single db:phrase as those where historically used for alt text).

    • The icons used for admonitions have been changed. One or two of them didn’t show up in EPUB readers.

    • Updated the extension functions that attempt to extract metadata from images so that they accept filenames that aren’t URIs. Also added support for a second “image” parameter, so that you can prevent them from attempting to parse, for example, a video as an image.

    • Added convenience variables $v:as-xml and $v:as-json for convenience in calls to fn:serialize(). Mostly this is for debugging.

    • Reworked how the preprocessing pipeline is evaluated.

    • Switched to using Sass to generate CSS.

    • Fixed a bug in link processing that sometimes resulted in nested anchors.

    • Fixed bug where unnumbered verbatim listings still had room for line numbers.

  • 1.10.1, 28 Oct 2022
    • Added support for enumsynopsis.

  • 1.10.0, 26 Oct 2022
    • Reworked the presentation of verbatim listings. The line numbers (in the “lines” format) are now padded to align on the right and have a space after them. This has no visible effect in a browser using CSS for rendering, but improves the result in text renderings. Also added a new “table” format that places the line numbers and the lines in separate columns of a table.

  • 1.9.0, 02 Oct 2022
    • The styling process begins with a series of preprocessing transformations: cleaning up the logical structure of the input; expanding XIncludes, converting DocBook 4.x to 5.x, if necessary; transclusion processing; normalizing the document structure; processing annotations; dealing with link bases; etc.

      Starting in this release, these transformations are distributed in both “compiled” and source forms. By default, if you’re using a Saxonica XSLT processor, the compiled forms will be used. This will generally result in faster transformations because it avoids the cost of analyzing the XSLT and preparing it for execution each time.

      You can disable them by setting use-compiled-transforms to “false”.

  • 1.8.1, 06 Sep 2022
    • Fixed a bug where ordered list continuations were being incorrectly identified.

    • Reworked how localizations are computed. The $v:locales variable has been replaced by the f:locales($context) function which returns the locales (languages) used by the document. (I’ve left the name f:locales for consistency with v:locales though I suspect f:languages would be a better name.) The correct locales are now loaded by default for modular documents.

Table of Contents