webhelp classic table caption

Posts: 4

webhelp classic table caption

Wed Oct 03, 2018 10:58 pm

Oxygen 20.1 DITA OT 2.x webhelp classic transform

I want to change: Table 1. Table label
to: Table: Table label

Where is the period after the table number being generated? Strings-en-us.xml <str name="Table">Table</str> does not contain the period.
Posts: 243

Re: webhelp classic table caption

Thu Oct 04, 2018 12:03 pm

Hi Mona,

Indeed, in the localization files (e.g. Strings-en-us.xml) is present only the table label not also the period. The period is added from the XSLT stylesheets used to process the input when the transformation scenario is run.
To may achieve this customization using XSLT extension points:

Ionela Istodor
oXygen XML Editor and Author Support
Posts: 4

Re: webhelp classic table caption

Fri Oct 05, 2018 3:44 pm

I realize that the period in the caption title is added by a stylesheet.
I looked in DITA-OT2.x/plugins/org.dita.xhtml/xsl/xslhtml/tables.xsl AND
Line:1009-1014 appears to be adding the label:

<xsl:call-template name="getVariable">
<xsl:with-param name="id" select="'Table'"/>
<xsl:text> </xsl:text>
<xsl:value-of select="$tbl-count-actual"/>
<xsl:text>. </xsl:text>

If I change the period there to a colon, it doesn't change in the output. So I'm asking whether or not I am looking at the right XSL stylesheet or is this being pulled from another stylesheet?
Posts: 4

Re: webhelp classic table caption

Fri Oct 05, 2018 9:13 pm

I found where the period is added. It's in:


Line:607: <xsl:sequence select="concat(dita-ot:get-variable(., 'Table'), ' ', $number, '. ')"/>

I copied this template that begins on line 605 - 608 to:


I changed the period to a colon, so that it matches the default figure caption label that is in the format Figure 1:

<xsl:sequence select="concat(dita-ot:get-variable(., 'Table'), ' ', $number, ': ')"/>

Whichever default caption formatting you want to use
Figure 1. Table 1.
Figure 1: Table 1:
Figure 1- Table 1-

It should be consistent in the pre-packaged code for webhelp output.

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 0 guests