Moving Figure Title Below Figure

Here should go questions about transforming XML with XSLT and FOP.
dgallo
Posts: 83

Moving Figure Title Below Figure

Fri May 13, 2016 10:18 pm

Hello,

How can I move the a figure and/or table's <title> and <desc> below the image and/or table in webhelp output?
Radu
Posts: 5563

Re: Moving Figure Title Below Figure

Mon May 16, 2016 3:38 pm

Hi,

There are no parameters to control this. Also in my opinion if you have a large table setting the title below it will not work as the end user will not see the title from the beginning.
But you can probably create an XHTML XSLT customization for this.
The XSLTs which are used to generate the XHTML output are located here:

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT2.x/plugins/org.dita.xhtml/

so maybe you could try to use our Find/Replace in Files utility to search in it for XSLT templates matching topic/fig and topic/table and try to see how the XSLT can be changed to output the table and figure titles at the end.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
dgallo
Posts: 83

Re: Moving Figure Title Below Figure

Mon May 16, 2016 4:11 pm

Is there an easy way to move the title and desc for images wrapped in a figure below the image?
Radu
Posts: 5563

Re: Moving Figure Title Below Figure

Mon May 16, 2016 4:19 pm

For anybody else reading this thread, I'm adding the link to the question you asked on the DITA Users List:

https://groups.yahoo.com/neo/groups/dita-users/conversations/messages/40110

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
dgallo
Posts: 83

Re: Moving Figure Title Below Figure

Mon May 16, 2016 4:27 pm

Your first suggestion was not very specific. I do not know xls or xlst so that is not helpful. Also, there are a ton of files in the org.dita.xhtml plugin folder, so I am not sure which one I need to be looking at.
Radu
Posts: 5563

Re: Moving Figure Title Below Figure

Tue May 17, 2016 10:54 am

Hi,

For a possible XSLT patch, assuming that you are publishing using the DITA Open Toolkit 1.8.5 bundled with Oxygen, in the XSLT stylesheet:

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.xhtml/xsl/xslhtml/dita2htmlImpl.xsl

there is an XSLT template which outputs the figure element:

Code: Select all

  <xsl:template match="*[contains(@class,' topic/fig ')]" mode="fig-fmt">


in which you can move the code:

Code: Select all

<xsl:call-template name="place-fig-lbl"/>


one line lower in the XSLT so that the title is output after the image reference.

As another possible approach in a similar post one of my colleagues suggested a CSS-based approach for this:

https://www.oxygenxml.com/forum/post37671.html

so this might be easier to accomplish than an XSLT customization.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 1 guest