[oXygen-user] Best practices ways to override default oXygen Web Help processing

Oxygen XML Editor Support (Radu Pisoi) support at oxygenxml.com
Tue Dec 10 06:19:13 CST 2019


Hello,

As a general rule, it is recommended to keep all changes outside the 
WebHelp plugin. This allows you to easily upgrade to a new WebHelp 
distribution.

The following customization methods are available:

1. Create a WebHelp publishing template

A publishing template It is a self-contained customization package 
stored as a ZIP archive or folder that can easily be shared with others. 
It provides the primary method for customizing the output allowing you to:
*  Customize various aspects of the output through simple CSS styling.
* Extend the default processing by specifying one or more XSLT extension 
points.
* Specify one or more transformation parameters to customize the output.

More information is available in our documentation 
<https://www.oxygenxml.com/doc/versions/21.1/ug-webhelp-responsive/topics/whr-publishing-template.html> 
or video presentation <https://www.oxygenxml.com/demo/opt.html>.

2. Create DITA-OT extension plugin

This method allows you to use one of WebHelp XSLT extension points 
<https://www.oxygenxml.com/doc/versions/21.1/ug-webhelp-responsive/topics/whr-responsive-override-xslt-dita-xslt-import.html> 
and it is preferable to use if you want to affect all WebHelp 
transformations.

Regarding to your questions to change generated text for task topic, the 
single available option is to create a DITA-OT extension plugin.

> If I want to change the task labels that are used when the 
> arg.gen.task.lbl parameter is specified, how do I accomplish this?
Please see the Modifying the Existing Strings 
<https://www.oxygenxml.com/doc/versions/21.1/ug-webhelp-responsive/topics/localize-webhelp-responsive.html#ariaid-title2> 
procedure from our manual for this task.


> If I want to ensure that a task label is generated for the 
> <tasktroubleshooting> element, how do I accomplish this?
For the elements that have not associated a label in the 'strings' 
files, like <tasktroubleshooting> element, you need also to contribute 
an XSLT template that lookup in the string files.

> <xsl:template match="*[contains(@class,' task/tasktroubleshooting ')]" 
> mode="dita2html:section-heading">
>         <xsl:apply-templates select="." mode="generate-task-label">
>             <xsl:with-param name="use-label">
>                 <xsl:call-template name="getVariable">
>                     <xsl:with-param name="id" 
> select="'task_tasktroubleshooting'"/>
>                 </xsl:call-template>
>             </xsl:with-param>
>         </xsl:apply-templates>
>     </xsl:template>
The XSLT stylesheet can be contributed using the /dita.xsl.html5/ XSLT 
extension point:

> <feature extension="dita.xsl.html5" file="task_labels.xsl"/>

Regards,

Radu
--
Radu Pisoi
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 12/10/2019 5:56 AM, Kristen James Eberlein wrote:
>
> I have questions about the best (and best practices) way to override 
> default Web Help processing.
>
>   * If I want to change the task labels that are used when the
>     arg.gen.task.lbl parameter is specified, how do I accomplish this?
>   * If I want to ensure that a task label is generated for the
>     <tasktroubleshooting> element, how do I accomplish this?
>
> I know how to effect these changes in a standard DITA-OT plug-in, but 
> I am not sure how best to override the logic for oXygen Web Help. Can 
> this be done in a Web Help template, or do I need to create a DITA-OT 
> plug-in?
>
> For this client, I want to keep everything as simple and modular as I 
> can, to make moving to new versions of oXygen possible.  (I am in the 
> midst of unraveling all the many changes that they hacked into oXygen 
> plug-ins ...)
>
> -- 
> Best,
> Kris
>
> Kristen James Eberlein
> Chair, OASIS DITA Technical Committee
> Principal consultant, Eberlein Consulting
> www.eberleinconsulting.com
> +1 919 622-1501; kriseberlein (skype)
>
>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> https://www.oxygenxml.com/mailman/listinfo/oxygen-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20191210/6b4aedfd/attachment.html>


More information about the oXygen-user mailing list