DITA-OT - Caption Below the Image

How to write a html override for putting the caption below an image.


Since I switched to the DITA-OT 1.8.5 my html override for putting the caption below the image does not work anymore. In the DITA-OT´s documentation of version 1.7 I found these lines:

Migrating mode=”elementname=fmt”

Prior to DITA-OT 1.7, many elements were processed with the following logic:

Match element
    Set variable to determine if revisions are active and $DRAFT is on
    If active
        create division with rev style
            process element with mode="elementname-fmt"
        end division
        process element with mode="elementname-fmt"

Match element with mode="elementname-fmt"
Process as needed

Beginning with DITA-OT 1.7, styling from revisions is handled automatically with the “commonattributes” template. This means there is no need for the extra testing, or the indirection to mode=”elementname-fmt”. These templates are deprecated, and element processing will move into the main element rule. Overrides that include this indirection may remove it; overrides should also be sure to match the default rule, rather than matching with mode=”elementname-fmt”.

It is still the template topic/fig that is to be adopted. It now can be found in the file dita2htmlImpl.xsl in the plugin folder org.dita.xhtml.

<xsl:call-template name="place-fig-lbl"/>
<xsl:value-of select="$newline"/>

The place-fig-lbl template again comes before the §newline but now you have to comment out or delete a few lines:

After this html override my captions are below the images again.