[xep-support] Generating Images with relative URL

Fritsch, Michael michael.fritsch at coremedia.com
Fri Jun 17 08:03:57 PDT 2005


Hello,
we are just upgrading from XEP 2.78 to 4.1 and now we have problems
generating Images.
 In my XSL-FO I have the following line which should include the Image
from a CMS system:

<fo:external-graphic src="/doc/generator/property=Image/id=66200.gif" />


This is a relative URI which should be expanded to
http://host:port/doc....
To do so, I'm using the following line in my Transformer class to set
the systemID:

String systemId = "http://"
            + generator.getServerName()
            + ":"
            + generator.getServerPort();

    System.out.println("Using System ID: " + systemId);
   // This prints the correct prefix of the URL
    Source saxSource = new SAXSource(_fo);
    saxSource.setSystemId(systemId);
    formatter.render(saxSource, printer);

That is, I'm setting the systemID with the prefix of the URL.
In XEP 2.78 everything worked fine but now I get the following error:

[warning] Could not retrieve image from
'http:/doc/generator/property=Image/id=66200.gif':
java.net.ConnectException: Connection refused

It seems that XEP does not use the systemID as a prefix but only http
which is indeed no valid path to the image. 

Best regards,
Michael
-- 
Dr. Michael Fritsch
Technical Editor

tel +49.40.325587.214
fax +49.40.325587.999
michael.fritsch at coremedia.com

CoreMedia
Ludwig-Erhard-Str. 18
20459 Hamburg, Germany
<www.coremedia.com>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20050617/86f13336/attachment.html>


More information about the Xep-support mailing list