Page 1 of 1

Image rendering in Author mode for XML files

Posted: Wed Sep 28, 2011 5:15 pm
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?

Re: Image rendering in Author mode for XML files

Posted: Wed Sep 28, 2011 5:37 pm
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

Re: Image rendering in Author mode for XML files

Posted: Wed Sep 28, 2011 5:43 pm
by ponsdv
Hi Radu,

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

Have a nice day!

Regards,
Wolfgang