Image rendering in Author mode for XML files

Having trouble installing Oxygen? Got a bug to report? Post it all here.
ponsdv
Posts: 4
Joined: Wed Sep 28, 2011 4:50 pm

Image rendering in Author mode for XML files

Post by ponsdv »

Hi,

I have got an XML file which contains image elements which I dubbed "Bild" (German for "image") with a src-attribute that contains the name of the png file which is located in the same directory as my XML file.

Code: Select all

<Bild src="notebook.png"/>
When I switch to Author Mode, only the file name of the PNG file is displayed as text, but it's not loaded and displayed.

My CSS looks like this:

Code: Select all

Bild {
display:block;
Content:attr(src);
}
When I try to insert images in HTML files, they are displayed correctly. Is there a method to achieve that for XML files as well?
Radu
Posts: 9447
Joined: Fri Jul 09, 2004 5:18 pm

Re: Image rendering in Author mode for XML files

Post by Radu »

Hi,

The CSS selector which would show the image in the Oxygen Author page would be like this:

Code: Select all

Bild {
display:block;
content: attr(src, url);
}
The content CSS property should be lowercased, Oxygen is case sensitive when interpreting CSS styles and the attr(src, url) url type is used by Oxygen to interpret the attribute as an image reference.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
ponsdv
Posts: 4
Joined: Wed Sep 28, 2011 4:50 pm

Re: Image rendering in Author mode for XML files

Post by ponsdv »

Hi Radu,

many thanks for your quick and efficient assistance! It works. :D

Have a nice day!

Regards,
Wolfgang
Post Reply