Re: Use a relative path

2002-06-06 Thread J.Pietschmann
Florence Deforge wrote:
I'm not sure it makes the difference but I always precede the relative path
with the file: string like this :
fo:external-graphic src=file:ecu.jpg/
That's a *bad* idea, actually violating URL syntax.
See
 http://marc.theaimsgroup.com/?l=xml-cocoon-devm=102027988321347w=2
for some explanations.
J.Pietschmann


Re: Use a relative path

2002-06-06 Thread J.Pietschmann
Hahn Kurt (CHA) wrote:
I need to add a graphics file, originally placed in the same directory where
my sitemap is located.
¨There's no problem if I use an absolute path, the file is displayed. If I
use a relative path, nothing. The file is very small, so I even copied in
other subdirectories, but still nothing. How can I do that?
working:
 fo:external-graphic
src=D:\jakarta-tomcat-4.0.1\webapps\cocoon\mount\AigleK\ecu.jpg/
not working:
fo:external-graphic src=ecu.jpg/
The src attribute actually takes an URL, not a path,
though the difference is often muddled with the active
help of the software.
A relative URL is resolved agains a base.
If you use FOP from the command line, the default base
is the directory where the FO file or the source XML file
resides. This can, in theory, be overridden (does not work
yet, I think).
If you use FOP in a servlet or embedded in an application,
the base must be set explicitely
 http://marc.theaimsgroup.com/?l=fop-devm=101354604124258w=2
If there is no baseDir set, I believe FOP will search from
the current working directory of the process it runs in.
J.Pietschmann