Customizing XHTML output

Post here questions and problems related to editing and publishing DITA content.
4everJang
Posts: 22
Joined: Mon Oct 14, 2013 2:12 pm

Customizing XHTML output

Post by 4everJang »

Hello,

I am preparing a presentation for tcworld in Wiesbaden (about 3 weeks from now) and would like to customize the XHTML output that is generated from a single DITA file (I am using the Machinery Task topic type). I need to add some javascript, link some icon images and use XSL to transform existing elements. I can find info on customization of PDF output, but there does not seem to be an equivalent directory for XHTML. The XSL should happen just before writing the XHTML file, i.e. after conrefs etc are resolved.

Thanks in advance to anyone who can point me in the right direction - (fast !)

Jang
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Customizing XHTML output

Post by sorin_ristache »

Hi Jang,

There is no Customization directory for the DITA XHTML transformation. You should start your customization from the stylesheet DITA-OT/xsl/dita2xhtml.xsl. In Oxygen the DITA-OT directory is located in: [Oxygen-install-dir]/frameworks/dita/DITA-OT. You can edit this dita2xhtml.xsl stylesheet, or you can create yur own custom stylesheet that imports dita2xhtml.xsl but in this case you will have to change the name of the stylesheet in the DITA-OT/plugins/org.dita.xhtml/build_general.xml build file.


Regards,
Sorin
gaurav_maindola
Posts: 11
Joined: Mon May 23, 2022 9:19 am

Re: Customizing XHTML output

Post by gaurav_maindola »

Hi Sorin,

Great explanation!
I think I am getting towards my answer for xhtml customization using dita map source file.

so, in this stylesheet, how can we customize the output for the xhtml? can you explain by giving an example?

like If I want to add a logo in my xhtml output file, what are the changes that i need to make, please let me know!


Thanks,
Gaurav
Post Reply