Page 1 of 1

Webhelp code highlighting in 17.1 is not backwards compatible

Posted: Tue Mar 22, 2016 8:43 am
by urbanrobots
Hello.

We recently upgraded to Oxygen Webhelp 17.1. We use DITA-OT 17.1 and notice that upgrading to Webhelp 17.1, without making any other changes, results in code highlighting not working. If we re-implement the Oxygen 17.1 Webhelp, then the code syntax highlighting works fine again.

What are we doing wrong?

Thanks,
-Nick

Re: Webhelp code highlighting in 17.1 is not backwards compatible

Posted: Tue Mar 22, 2016 6:02 pm
by bogdan_cercelaru
Hello,

I cannot reproduce this issue using Oxygen v17.1 build 2016020417 with DITA-OT 1.8 and the following snapshot in a DITA topic:

Code: Select all


<codeblock outputclass="language-xml"><root>
<elem attr1="test" attr2="cucu">First element</elem>
<elem attr1="test1" attr2="cucu1">Second element</elem>
</root>
</codeblock>
Please send us a sample topic or more details regarding this issue.

Regards,
Bogdan

Re: Webhelp code highlighting in 17.1 is not backwards compatible

Posted: Fri Mar 25, 2016 5:37 am
by urbanrobots
Hi Bogdan,

The problem existed in the plugin_commons.xml file. It took a while to figure this out, but copying these lines from Oxygen Webhelp 17's plugin_common.xml file to Oxygen Webhelp 17.1's plugin_common.xml file seemed to get the highlighting to work in 17.1 output.

Code: Select all


<feature extension="dita.conductor.lib.import" file="lib/ant-contrib-1.0b3.jar"/>
<feature extension="dita.conductor.lib.import" file="lib/dost-patches-DITA-1.7.jar"/>
<feature extension="dita.conductor.lib.import" file="lib/dost-patches-DITA-1.8.jar"/>
<feature extension="dita.conductor.lib.import" file="lib/lucene-analyzers-common-4.0.0.jar"/>
<feature extension="dita.conductor.lib.import" file="lib/lucene-core-4.0.0.jar"/>
<feature extension="dita.conductor.lib.import" file="lib/resolver.jar"/>
<feature extension="dita.conductor.lib.import" file="lib/webhelpXsltExtensions.jar"/>
<feature extension="dita.conductor.lib.import" file="lib/xercesImpl.jar"/>
<feature extension="dita.conductor.lib.import" file="lib/xhtml-indexer.jar"/>
<feature extension="dita.conductor.lib.import" file="lib/xml-apis-ext.jar"/>
<feature extension="dita.conductor.lib.import" file="lib/xml-apis.jar"/>
<feature extension="dita.conductor.lib.import" file="lib/xslthl-2.0.1.jar"/>
<feature extension="dita.conductor.lib.import" file="lib/license.jar"/>
<feature extension="dita.conductor.lib.import" file="lib/log4j.jar"/>
<feature extension="dita.conductor.lib.import" file="lib/saxonb9-1-0-8j/saxon9.jar"/>
<feature extension="dita.conductor.lib.import" file="lib/saxonb9-1-0-8j/saxon9-dom.jar"/>
I know that's not a very elegant solution. If you can isolate this even further, I'm curious to learn about the specific problem.

By the way, is it possible to integrate Oxygen's Syntax Highlighting with a PDF plugin? It looks good.

Take care,
- Nick

Re: Webhelp code highlighting in 17.1 is not backwards compatible

Posted: Mon Mar 28, 2016 2:12 pm
by Radu
Hi Nick,

The com.oxygenxml.highlight DITA OT plugin which we provide, once integrated in a DITA OT, should be able to provide syntax highlight both for the XHTML-based and PDF outputs. The XSLT stylesheet com.oxygenxml.highlight/pdfHighlight.xsl can be modified to assign various colors to various tokens.
Indeed it needs the JAR library from its lib folder to be present in the DITA OT ANT classpath.

Regards,
Radu