How to customize the TOC of the DITA-OT-XHTML transtype

Here should go questions about transforming XML with XSLT and FOP.
xephon
Posts: 98
Joined: Mon Nov 24, 2014 1:49 pm
Location: Münster/Germany

How to customize the TOC of the DITA-OT-XHTML transtype

Post by xephon » Mon Nov 24, 2014 2:56 pm

Hi,

I want to create a new transformation scenario based on the XHTML transformation. I want to manipulate the TOC (the

Code: Select all

index.html
), but I could not yet figure out how to do that. Could someone please tell me which template I have to override? I'll share the transformation scenario afterwards.

Thanks a lot!
Join the DOCTALES DITA development team :arrow: https://doctales.atlassian.net/wiki

Radu
Posts: 6211
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to customize the TOC of the DITA-OT-XHTML transtype

Post by Radu » Mon Nov 24, 2014 6:03 pm

Hi Stefan,

Probably the main XSL which converts the DITA Map to the TOC is this one:

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

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

xephon
Posts: 98
Joined: Mon Nov 24, 2014 1:49 pm
Location: Münster/Germany

Re: How to customize the TOC of the DITA-OT-XHTML transtype

Post by xephon » Mon Nov 24, 2014 6:48 pm

Hi Radu,

I thought the right template is the generate-toc in the map2htmltocImpl.xsl. But I cannot override it as expected.

:?:

Best regards
Stefan
Join the DOCTALES DITA development team :arrow: https://doctales.atlassian.net/wiki

Radu
Posts: 6211
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to customize the TOC of the DITA-OT-XHTML transtype

Post by Radu » Tue Nov 25, 2014 9:59 am

Hi Stefan,

Looking in the plugin.xml for the base XHTML TOC output:

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.xhtml/plugin.xml

it has an extension point specific for adding a custom XSL to customize the TOC part:

Code: Select all

<extension-point id="dita.xsl.htmltoc" name="HTML/XHTML TOC XSLT import"/>
so probably from your plugin.xml you could use it like:

Code: Select all

<feature extension="dita.xsl.htmltoc" value="custom.xsl" type="file"/>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

xephon
Posts: 98
Joined: Mon Nov 24, 2014 1:49 pm
Location: Münster/Germany

Re: How to customize the TOC of the DITA-OT-XHTML transtype

Post by xephon » Wed Nov 26, 2014 12:58 am

Thanks Radu
Join the DOCTALES DITA development team :arrow: https://doctales.atlassian.net/wiki

Post Reply