Rendering specific PIs as images

Post here questions and problems related to oXygen frameworks/document types.
honyk
Posts: 176
Joined: Wed Apr 29, 2009 4:55 pm

Rendering specific PIs as images

Post by honyk »

Imagine <?inline-icon name="arrow"?> PI. Would it be possible to display it in the Author mode like the standard image (i.e. like inlinemediaobject in DocBook document)? The name corresponds to the image in the dedicated folder within the framework.

I am accepting the content would be editable only in the text mode.

In the API description there are methods for inserting XML fragments, but I couldn't find anything what can override the element rendering.

In CSS I am unable to use the image passed to PI as pseudo-attribute.

Any idea?
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Rendering specific PIs as images

Post by Radu »

Hi,

In your CSS you need to define this prefix-namespace mapping after all imports:

Code: Select all

@namespace oxy "http://www.oxygenxml.com/extensions/author";
and then add a selector looking something like:

Code: Select all

oxy|processing-instruction[inline-icon]:before{
content: attr(name, url);
}
oxy|processing-instruction[inline-icon]{
visibility:-oxy-collapse-text;
}
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply