Page 1 of 1

WebHelp outputs different HTML for warnings and cautions

Posted: Mon Mar 12, 2018 11:31 pm
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.

Re: WebHelp outputs different HTML for warnings and cautions

Posted: Fri Mar 16, 2018 4:56 pm
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

Re: WebHelp outputs different HTML for warnings and cautions

Posted: Thu Mar 22, 2018 12:30 am
by mdslup
Thanks