How to customize the TOC of the DITA-OT-XHTML transtype
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 159
- Joined: Mon Nov 24, 2014 1:49 pm
- Location: Greven/Germany
How to customize the TOC of the DITA-OT-XHTML transtype
Hi,
I want to create a new transformation scenario based on the XHTML transformation. I want to manipulate the TOC (the), 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!
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
Thanks a lot!
stefan-jung.org – Your DITA/DITA-OT XML consultant
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to customize the TOC of the DITA-OT-XHTML transtype
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
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
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 159
- Joined: Mon Nov 24, 2014 1:49 pm
- Location: Greven/Germany
Re: How to customize the TOC of the DITA-OT-XHTML transtype
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
I thought the right template is the generate-toc in the map2htmltocImpl.xsl. But I cannot override it as expected.

Best regards
Stefan
stefan-jung.org – Your DITA/DITA-OT XML consultant
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to customize the TOC of the DITA-OT-XHTML transtype
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:
so probably from your plugin.xml you could use it like:
Regards,
Radu
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"/>
Code: Select all
<feature extension="dita.xsl.htmltoc" value="custom.xsl" type="file"/>
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 8
- Joined: Wed Nov 08, 2017 5:11 pm
Re: How to customize the TOC of the DITA-OT-XHTML transtype
Hi Radu,
Seeking your help for generating a DITA XHTML
Query 1 - I need the ToC with a numbered list. Currently, the ToC appears as bullets and sub-bullets. Adding current
Query 2 - I need to add a footer to the DITA PDF to customize and add the copyright. Editing this file and tag does not work:
\Oxygen XML Editor 16\frameworks\dita\DITA-OT\xsl\common\strings-en-us.xml with
<str name="Foot note">Footnote.</str>
<str name="Footer">Copyright © 2020. Company, Inc. All rights reserved.</str>
Seeking your help for generating a DITA XHTML
Query 1 - I need the ToC with a numbered list. Currently, the ToC appears as bullets and sub-bullets. Adding current
Query 2 - I need to add a footer to the DITA PDF to customize and add the copyright. Editing this file and tag does not work:
\Oxygen XML Editor 16\frameworks\dita\DITA-OT\xsl\common\strings-en-us.xml with
<str name="Foot note">Footnote.</str>
<str name="Footer">Copyright © 2020. Company, Inc. All rights reserved.</str>
dita_xhtml_toc_bullets.PNG
dita-xhtml-toc-expected-output.PNG
Adding the expected output too here. Please help.You do not have the required permissions to view the files attached to this post.
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to customize the TOC of the DITA-OT-XHTML transtype
Hi Rushina,
For (1) I looked in the XHTML output and that particular <ul> used in the TOC has a class="map" attribute set on it. So maybe you can create a custom.css with the content:
and use it in the published output. For this you need to edit the transformation scenario, set the "args.css" parameter to point to the CSS and the "args.copycss" parameter to "yes".
For (2) maybe this help topic from the Oxygen user's manual will help:
https://www.oxygenxml.com/doc/versions/ ... ation.html
Regards,
Radu
For (1) I looked in the XHTML output and that particular <ul> used in the TOC has a class="map" attribute set on it. So maybe you can create a custom.css with the content:
Code: Select all
ul[class='map'] li{
list-style-type:decimal;
}
For (2) maybe this help topic from the Oxygen user's manual will help:
https://www.oxygenxml.com/doc/versions/ ... ation.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service