<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7232.36">
<TITLE>Generating Images with relative URL</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<BR>
<P><FONT SIZE=2 FACE="Verdana">Hello,</FONT>
<BR><FONT SIZE=2 FACE="Verdana">we are just upgrading from XEP 2.78 to 4.1 and now we have problems generating Images.</FONT>
<BR><FONT SIZE=2 FACE="Verdana"> In my XSL-FO I have the following line which should include the Image from a CMS system:</FONT>
</P>
<P><FONT FACE="Times New Roman"><fo:external-graphic src="<B>/doc/generator/property=Image/id=66200.gif</B>" /> </FONT>
</P>
<P><FONT SIZE=2 FACE="Verdana">This is a relative URI which should be expanded to </FONT><A HREF="http://host:port/doc"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Verdana">http://host:port/doc</FONT></U></A><FONT SIZE=2 FACE="Verdana">....</FONT>
<BR><FONT SIZE=2 FACE="Verdana">To do so, I'm using the following line in my Transformer class to set the systemID:<BR>
</FONT>
<BR><FONT SIZE=2 FACE="Verdana">String systemId = "</FONT><A HREF="http://"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Verdana">http://</FONT></U></A><FONT SIZE=2 FACE="Verdana">"</FONT>
<BR><FONT SIZE=2 FACE="Verdana"> + generator.getServerName()</FONT>
<BR><FONT SIZE=2 FACE="Verdana"> + ":"</FONT>
<BR><FONT SIZE=2 FACE="Verdana"> + generator.getServerPort();</FONT>
</P>
<P><FONT SIZE=2 FACE="Verdana"> System.out.println("Using System ID: " + systemId);</FONT>
<BR><FONT SIZE=2 FACE="Verdana"> // This prints the correct prefix of the URL</FONT>
<BR><FONT SIZE=2 FACE="Verdana"> Source saxSource = new SAXSource(_fo);</FONT>
<BR><FONT SIZE=2 FACE="Verdana"> saxSource.setSystemId(systemId);</FONT>
<BR><FONT SIZE=2 FACE="Verdana"> formatter.render(saxSource, printer);</FONT>
</P>
<P><FONT SIZE=2 FACE="Verdana">That is, I'm setting the systemID with the prefix of the URL.</FONT>
<BR><FONT SIZE=2 FACE="Verdana">In XEP 2.78 everything worked fine but now I get the following error:</FONT>
</P>
<P><FONT SIZE=2 FACE="Verdana">[warning] Could not retrieve image from '</FONT><A HREF="http:/doc/generator/property=Image/id=66200.gif"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Verdana">http:/doc/generator/property=Image/id=66200.gif</FONT></U></A><FONT SIZE=2 FACE="Verdana">': java.net.ConnectException: Connection refused</FONT></P>
<P><FONT SIZE=2 FACE="Verdana">It seems that XEP does not use the systemID as a prefix but only http which is indeed no valid path to the image. </FONT>
</P>
<P><FONT SIZE=2 FACE="Verdana">Best regards,</FONT>
<BR><FONT SIZE=2 FACE="Verdana">Michael</FONT>
<BR><FONT COLOR="#808080" SIZE=2 FACE="Courier New">-- </FONT>
<BR><B><FONT COLOR="#808080" SIZE=2 FACE="Courier New">Dr. Michael Fritsch</FONT></B>
<BR><FONT COLOR="#808080" SIZE=2 FACE="Courier New">Technical Editor</FONT>
</P>
<P><FONT COLOR="#808080" SIZE=2 FACE="Courier New">tel +49.40.325587.214</FONT>
<BR><FONT COLOR="#808080" SIZE=2 FACE="Courier New">fax +49.40.325587.999</FONT>
<BR><FONT COLOR="#808080" SIZE=2 FACE="Courier New">michael.fritsch@coremedia.com</FONT>
</P>
<P><FONT COLOR="#808080" SIZE=2 FACE="Courier New">CoreMedia</FONT>
<BR><FONT COLOR="#808080" SIZE=2 FACE="Courier New">Ludwig-Erhard-Str. 18</FONT>
<BR><FONT COLOR="#808080" SIZE=2 FACE="Courier New">20459 Hamburg, Germany</FONT>
<BR><FONT COLOR="#808080" SIZE=2 FACE="Courier New"><</FONT><A HREF="file://www.coremedia.com"><U></U><U><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">www.coremedia.com</FONT></U></A><FONT COLOR="#808080" SIZE=2 FACE="Courier New">></FONT>
</P>
<BR>
<BR>
</BODY>
</HTML>