Rendering Processing Instructions

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Kasturi999
Posts: 15
Joined: Fri Jan 08, 2010 2:50 pm

Rendering Processing Instructions

Post by Kasturi999 »

Hi,

How can I render the text in the below processing instructions with different colors like the below?
1. <?abc content=” Text 213” ?>  RED
2. <?abc_start?>Example text<?abc_end?>  BLUE

Can this be done with the CSS elements - oxy|processing-instruction? If yes, can we identify the processing-instruction with names?

Thanks
KK
mihaela
Posts: 515
Joined: Wed May 20, 2009 2:40 pm

Re: Rendering Processing Instructions

Post by mihaela »

Hi,

For the moment you can use the oxy|processing-instruction only to match all the processing instructions, regardless their cotnent.

Starting with the next version of oXygen (14.1) you will be able to match all the attributes of a processing instruction using the oxy|processing-instruction[attribute_name] oXygen custom selector.
For your PI sample at 1., the following CSS code will set a red foreground color for the processing instruction content presented in Author:

Code: Select all

@namespace oxy url('http://www.oxygenxml.com/extensions/author');

oxy|processing-instruction[abc] {
color: red !important;
}
Regarding 2.: there is no possible to match in CSS the text between two processing instructions. What you can do is to create custom highlights to mark some content from the document using the oXygen Author SDK (see http://www.oxygenxml.com/forum/topic7205.html).

Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
Post Reply