Image display with oxy_url

Post here questions and problems related to oXygen frameworks/document types.
Isabelle
Posts: 149
Joined: Fri Jan 20, 2017 1:11 pm

Image display with oxy_url

Post by Isabelle »

Hello,

We use the version 26.0.0.0 of oxygen sdk.
In our application we handle CGM files but we want to display the raster version in format JPEG.
We used to do this in our css this way :

Code: Select all

content: oxy_url(oxy_replace(oxy_unparsed-entity-uri(attr(infoIdent)), '.CGM', 'JPEG'));
Now we want to do it dynamically, so we try this :

Code: Select all

content: oxy_url(oxy_replace(oxy_unparsed-entity-uri(attr(infoIdent)), '.CGM', '${system("raster.ext")}'));
with raster.ext set to .JPEG or an other extension.

It works quite well, the issue is that we only have the raster.ext value after css is first loaded.
So we need to force the refresh to see images properly.

Do you have a better way to implement this behavior ?
Is it possible to use StylesFilter class to do it ?

Thanks,
Regards,
Isabelle
Radu
Posts: 9205
Joined: Fri Jul 09, 2004 5:18 pm

Re: Image display with oxy_url

Post by Radu »

Hi Isabelle,
You seem to have the correct approach of refreshing the document.
This looks like a coding problem with not being able to properly compute and set the system property before the XML document is opened.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply