Webhelp code highlighting in 17.1 is not backwards compatible

Here should go questions about transforming XML with XSLT and FOP.
urbanrobots
Posts: 84
Joined: Sun May 03, 2015 7:34 pm
Location: San Francisco

Webhelp code highlighting in 17.1 is not backwards compatible

Post by urbanrobots » Tue Mar 22, 2016 8:43 am

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

bogdan_cercelaru
Posts: 213
Joined: Tue Jul 01, 2014 11:48 am

Re: Webhelp code highlighting in 17.1 is not backwards compatible

Post by bogdan_cercelaru » Tue Mar 22, 2016 6:02 pm

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
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

urbanrobots
Posts: 84
Joined: Sun May 03, 2015 7:34 pm
Location: San Francisco

Re: Webhelp code highlighting in 17.1 is not backwards compatible

Post by urbanrobots » Fri Mar 25, 2016 5:37 am

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

Radu
Posts: 6507
Joined: Fri Jul 09, 2004 5:18 pm

Re: Webhelp code highlighting in 17.1 is not backwards compatible

Post by Radu » Mon Mar 28, 2016 2:12 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply