Page 1 of 1

Rendering Processing Instructions

Posted: Wed Sep 12, 2012 1:05 am
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

Re: Rendering Processing Instructions

Posted: Wed Sep 12, 2012 11:06 am
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