pboparai at chc.ca wrote:
>
> I'm trying to display images as a preview in XML Mind. The code I'm
> currently using looks like this:
>
> imagedata {
> content: image(attr(entityref), -400, -100, smooth);
> }
>
> This works fine if the images are in the same folder as the file,
> however the problem is that the images are in a subfolder called
> "Images". I understand that I can do something such as the following:
Entityrefs are definitely not supported by XMLmind XML Editor.
> imagedata {
> content: image("C:\Documents\Images\dog.png", -400, -100, smooth);
> }
>
>
> However, in my case, the images are being pulled down from a server and
> the full absolute path is not known beforehand (all I know is that
> wherever the XML file is located, the images are in a subdirectory
> called "Images").
>
The image() pseudo-function accepts filenames but preferably *URLs*.
Therefore, something like that should work fine:
imagedata {
content:image(xpath("concat('http://www.xmlmind.com/xmleditor/screenshots/', at
fileref)"),
-400, -100, smooth);
}
Suffice for attribute fileref to just contain the *basename* of the
image, and not its absolute path. Examples: macosx.png, linux.png,
docbook-table.png, etc.
Images accessed through a CGI or a servlet should work fine too.