Syntax Highlight

Having trouble installing Oxygen? Got a bug to report? Post it all here.
bmayer
Posts: 22
Joined: Mon Jul 09, 2012 5:30 pm

Syntax Highlight

Post by bmayer »

Hi,

We use oXygen Author 14.2 for DITA XML within Eclipse 3.5.2. We're trying to change the font colour for some XML elements, like Processing Instructions via Window > Preferences > oXygen > Editor > Syntax Highlight > XML. If I change the foreground colour I see the new colour via oXygen text view, but Author view doesn't update and always shows the old colour. Is there a way to get Author view to show the correct colour, i.e. the same one text view is showing? I seem to see the same thing via the standalone Editor 14.2 client.

Thanks,
Belinda
Costin
Posts: 846
Joined: Mon Dec 05, 2011 6:04 pm

Re: Syntax Highlight

Post by Costin »

Hello,

Please note that the syntax highlight only applies for the Text editing mode (not for the Author mode), affecting the color specific tags (elements, attributes, PIs, etc) are displayed.
Therefore, the eventual changes you made in any of the tabs from Window > Preferences > oXygen > Editor > Syntax Highlight, would affect only the Text mode.
For the Author mode, changes to the way some elements would be displayed could be carried using CSS instead.

However, in order to have a broader idea about what you are trying to obtain, could you please provide more details about the changes you are trying to get and their context?
Some screenshots might also prove helpful.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
bmayer
Posts: 22
Joined: Mon Jul 09, 2012 5:30 pm

Re: Syntax Highlight

Post by bmayer »

Thanks Costin, looks like CSS is the way to go then. I don't seem to be able to attach a screen capture to the post so I'll try to describe what I'm looking for. In Author view, we'd like to change processing instructions from purple text to black text.

<p><?sample processing instruction?></p>

Thanks,
Belinda
Radu
Posts: 9448
Joined: Fri Jul 09, 2004 5:18 pm

Re: Syntax Highlight

Post by Radu »

Hi Belinda,

You need a CSS customization for this.
If you open this CSS:

OXYGEN_PLUGIN_DIR/frameworks/dita/css_classed/dita.css

after all the @import's you can add this:

Code: Select all

@namespace oxy "http://www.oxygenxml.com/extensions/author";

oxy|processing-instruction {
color: black !important;
}
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bmayer
Posts: 22
Joined: Mon Jul 09, 2012 5:30 pm

Re: Syntax Highlight

Post by bmayer »

Hi Radu,

I was testing this out on the latest release 15 build in Eclipse. When I view a DITA XML topic with a processing instruction the font is blue, however, it's now opening up a Results window. It doesn't display anything in the Results but it opens it every time which can be a bit annoying. Can you advise if this is still the correct syntax for release 15?

Thanks in advance,
Belinda
Radu
Posts: 9448
Joined: Fri Jul 09, 2004 5:18 pm

Re: Syntax Highlight

Post by Radu »

Hi Belinda,

The fix should still work.
I could not reproduce the issue with the empty Results window showing up.
Does it show up on your side when opening the DITA file, when modifying it or when saving? Does it show up even if you close it?
Do you also have a DITA Map opened in the DITA Maps Manager?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bmayer
Posts: 22
Joined: Mon Jul 09, 2012 5:30 pm

Re: Syntax Highlight

Post by bmayer »

It shows up with both opening and saving any DITA files. If you want to provide your email address, I can email you a screen capture as well as my dita.css file.
Radu
Posts: 9448
Joined: Fri Jul 09, 2004 5:18 pm

Re: Syntax Highlight

Post by Radu »

Hi Belinda,

You can use our usual technical support email address support@oxygenxml.com.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bmayer
Posts: 22
Joined: Mon Jul 09, 2012 5:30 pm

Re: Syntax Highlight

Post by bmayer »

After closing and reopening Eclipse again it appears to be working now. Thanks for your help!
Post Reply