Customize WebHelp XSL with custom DITA-OT plugin

Post here questions and problems related to editing and publishing DITA content.
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Customize WebHelp XSL with custom DITA-OT plugin

Post by Patrik »

Hi,

I'm trying to customize the dita2webhelp transformation on XSL level. Since I have specialized classes I also need to modify the underlying xhtml transformation. I very much dislike the idea of mixing standard and custom source by directly modifying the xhtml and webhelp plugin. So I was hoping that there is a way to keep the custom files in my custom DITA-OT plugin just like I did for the pdf customization. Is this possible?

Thanks and regards,
Patrik
radu_pisoi
Posts: 403
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: Customize WebHelp XSL with custom DITA-OT plugin

Post by radu_pisoi »

Hi,

The next oXygen WebHelp version will support two XSLT extension points for DITA-OT:
  • one that allows you to override the stylesheets used to produce an HTML file for each topic (webhelp2dita.xsl);
  • another for overriding the stylesheet that creates the main HTML page.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Re: Customize WebHelp XSL with custom DITA-OT plugin

Post by Patrik »

Thanks, sounds great.

However, I also just managed to create my own custom webhelp transtype that imports the original xsl and overwrites specific templates.

Regards,
Patrik
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Re: Customize WebHelp XSL with custom DITA-OT plugin

Post by Patrik »

It would be nice if you could add an extension point for adding parameters like it is possible for pdf.

Patrik
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Re: Customize WebHelp XSL with custom DITA-OT plugin

Post by Patrik »

I mean XSLT parameters...
radu_pisoi
Posts: 403
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: Customize WebHelp XSL with custom DITA-OT plugin

Post by radu_pisoi »

Yes, the next oXygen Webhelp version will include XSLT-parameter extension points for DITA-OT. These will allow you to pass parameters to your extension stylesheets.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
GSejourne
Posts: 15
Joined: Tue Mar 15, 2011 12:56 pm

Re: Customize WebHelp XSL with custom DITA-OT plugin

Post by GSejourne »

Hi,
I'd like to resurrect this topic, as I'm hitting the same use case.
In the September thread, you say the next Oxygen release will implement this.

Currently, I want to produce a Webhelp with feedback output, but I have a set of custom DITA elements which are defined in a plugin. This plugin provides extensions for both HTML5 and PDF output, but what do I need to do to extend the default oxygen-webhelp output ?

Thanks,

Guillaume
GSejourne
Posts: 15
Joined: Tue Mar 15, 2011 12:56 pm

Re: Customize WebHelp XSL with custom DITA-OT plugin

Post by GSejourne »

Hi,
I've added the following extension point to my custom plugin, and it seems to do the trick:

Code: Select all

<feature extension="com.oxygenxml.webhelp.xsl.dita2webhelp" file="xsl/api2html.xsl"/>
Is there anything else I need to do, knowing that it works ?
radu_pisoi
Posts: 403
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: Customize WebHelp XSL with custom DITA-OT plugin

Post by radu_pisoi »

Hi,

Sorry for the late reply.

The com.oxygenxml.webhelp.xsl.dita2webhelp extension point is useful if you want to modify the XSLT transformation that produces an HTML file for each topic. There is another extension point that might be interesting for you: com.oxygenxml.webhelp.xsl.dita2webhelp.param. This extension point allows you to pass parameters to the XSLT stylesheet specified using the com.oxygenxml.webhelp.xsl.dita2webhelp extension point.

All the available WebHelp XSLT extension points and their meaning are explained in our user manual in the next topic: https://www.oxygenxml.com/doc/versions/ ... hing2.html
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply