WebHelp outputs different HTML for warnings and cautions

Having trouble installing Oxygen? Got a bug to report? Post it all here.
mdslup
Posts: 167
Joined: Tue Mar 06, 2018 1:34 am

WebHelp outputs different HTML for warnings and cautions

Post by mdslup »

Oxygen Editor 19.1, WebHelp Classic output.

Within the same task topic, the generated HTML for cautions and warnings is different:

[Codebox=]
<div class="note warning">
<span class="warningtitle">Warning:</span>
Warning Text
</div>
[/Codebox]

[Codebox=]
<div class="cautiontitle">CAUTION:</div>
<div class="note caution">
Caution Text
</div>
[/Codebox]

Note how the Warning has a span within a div...this puts both the "Warning" word and the actual text of the warning on the same line, which is correct. But the Caution has 2 separate divs. This puts the "Caution" word on one line, and the actual text of the caution on a new line. I don't believe this is correct.

Can anyone reproduce and suggest a fix?

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

Re: WebHelp outputs different HTML for warnings and cautions

Post by radu_pisoi »

Hi,

Thank you for reporting this inconsistency. I will register an issue in our internal issue tracker to find a solution.

Until this problem will be fixed, you can create a DITA-OT XHTML extension plugin that overrides the XSLT template responsible to generate the CAUTION note.

Template to override:

Code: Select all

<xsl:template match="*" mode="process.note.caution">
Source XSLT stylesheet:

Code: Select all

{DITA-OT-INSTALL_DIR}/plugins/org.dita.xhtml/xsl/xslhtml/dita2htmlImpl.xsl
See more information in the Custom HTML plug-ins topic from the DITA-OT documentation:
http://www.dita-ot.org/dev/topics/html- ... ugins.html
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
mdslup
Posts: 167
Joined: Tue Mar 06, 2018 1:34 am

Re: WebHelp outputs different HTML for warnings and cautions

Post by mdslup »

Thanks
Post Reply