How to change the figure title and table title default separator?

Post here questions and problems related to editing and publishing DITA content.
lhsihan
Posts: 35
Joined: Thu Aug 15, 2019 5:31 pm

How to change the figure title and table title default separator?

Post by lhsihan »

We have one requirement that would liket to use the below format for figure and table title:
1. figure title format: "Figure: counter "#####";
2.table title format: "Table " counter "#####";

And this format just has different separator with default ones.

How can we get this done? Could you please give me a hand on this?

Thanks a lot.
lhsihan
Posts: 35
Joined: Thu Aug 15, 2019 5:31 pm

Re: How to change the figure title and table title default separator?

Post by lhsihan »

I have found if we update the below files we can change the default separator.
1. C:\Program Files\Oxygen XML Editor 21\frameworks\dita\DITA-OT3.x\plugins\com.oxygenxml.html.custom\custom.xsl
2. C:\Program Files\Oxygen XML Editor 21\frameworks\dita\DITA-OT3.x\plugins\org.dita.html5\xsl\table.xsl

Is there any way we can copy this two files , add references for them in plugin.xml like below, and use this in transformation scenario?

Code: Select all

<feature extension="dita.xsl.xhtml" value="xsl/custom.xsl" type="file"/>  
<feature extension="dita.xsl.html5" value="xsl/custom.xsl" type="file"/>
And also have another question that we use our own html5 transformation plugin, why it still use the other plugins under C:\Program Files\Oxygen XML Editor 21\frameworks\dita\DITA-OT3.x\plugins when doing HTML5 transformation scenario?

Thanks so much.
radu_pisoi
Posts: 404
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: How to change the figure title and table title default separator?

Post by radu_pisoi »

Hi,

You can overwrite functionality from the com.oxygenxml.html.custom\custom.xsl XSLT stylesheet by creating a DITA-OT customization plugin that use the dita.xsl.html5 XSLT extension point.

Make sure you make a dependency to the com.oxygenxml.html.custom plugin, so your XSLT templates can overwrite XSLT templates from the com.oxygenxml.html.custom plugin.

Code: Select all

<plugin id="com.oxygenxml.html.user.custom">
  <require plugin="com.oxygenxml.html.custom"/>

  <feature extension="dita.xsl.html5" value="custom.xsl" type="file"/>
</plugin>
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply