PDF Syntax Highlighting

Here should go questions about transforming XML with XSLT and FOP.
easirois
Posts: 11
Joined: Thu Feb 04, 2010 10:37 pm

PDF Syntax Highlighting

Post by easirois »

Hi,

I'm trying to get syntax highlighting to work in a PDF output outside of oXYgen (16.1) with DITA 1.8.5. I do have a license for webhelp and both plugins (webhelp and highlight), but I can't get the highlighting to work at all. It just keeps defaulting to the code in the grey background. Is there something I'm missing in terms of requirements. I'm using the out-of-the-box config. Testing Java and XML syntax highlighting

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

Re: PDF Syntax Highlighting

Post by Radu »

Hi Eric,

Oxygen 16 is very old, it's in our end of support policy:

https://www.oxygenxml.com/eol.html

did you add this plugin "OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\com.oxygenxml.highlight" to the DITA OT 1.8.5 that you are using out of the box?
Did you add the proper @outputclass attribute values like language-xml on the codeblock elements?
Can you maybe add some xsl:messages in the XSLT stylesheets from the "com.oxygenxml.highlight" plugin to see what's going on?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
easirois
Posts: 11
Joined: Thu Feb 04, 2010 10:37 pm

Re: PDF Syntax Highlighting

Post by easirois »

Hi Radu,

I did place the plugins in a vanilla OT and ran the build for pdf2. I placed a bunch of "woohoo" messages in the pdfHighlight.xsl file and they do appear in the logs. So the template is being called, but the syntax highlight is not found in the output.

transform.topic2fo.main:
[xslt] Processing D:\projects\temp\stage1a.xml to D:\projects\\temp\stage2.fo
[xslt] Loading stylesheet D:\data\DITA-OT1.8.5\plugins\org.dita.pdf2\xsl\fo\topic2fo_shell_fop.xsl
[xslt] D:\data\DITA-OT1.8.5\plugins\org.dita.pdf2\xsl\fo\front-matter.xsl:82:40: Warning! A variable with no following sibling instructions has no effect
[xslt] woohoo
[xslt] woohoo
[xslt] woohoo
[xslt] [PDFX010W][WARN]: Index generation is not supported in FOP.

Eric
easirois
Posts: 11
Joined: Thu Feb 04, 2010 10:37 pm

Re: PDF Syntax Highlighting

Post by easirois »

And when I try to output XHTML, then I get the following error:

java.lang.ClassNotFoundException: net.sf.saxon.om.AxisInfo

Which is not available in the version of Saxon that is shipped with that version of the OT. But then we get into a chicken and egg issue. If i update the version of Saxon that contains that class, then I get errors regarding java extension.

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

Re: PDF Syntax Highlighting

Post by Radu »

Hi,

Sorry but we no longer support such old DITA OT versions.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply