Hi

Sorry I goofed the earlier mail.

I think if you are running under tomcat, the BASE directory is tomcat/bin
If you are running from command line, Java_home is the BASE dir
Rgds
Jay



-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Magnus
Sjöberg
Gesendet: Mittwoch, 13. März 2002 15:59
An: [EMAIL PROTECTED]
Betreff: Re: SV: SV: external-graphic src syntax


That's bizarre, I 'assumed' FOP used the current directory
as its base dir...
I ran the following command with test.xml, test.xsl and
image.jpg in the current directory:

current_dir> java org.apache.fop.apps.Fop -xml test.xml -xsl
test.xsl -pdf test.pdf

All images in the xml are added to the fo using
<fo:external-graphic src="image.jpg"/>
This produces no errors.
Exactly what sequence of events are you using to create the
PDF?

///Magnus

Michael Engelhart wrote:
>
> Thanks Mangus,
>
> That's great info.  (Maybe we can get it stuck into the FAQ? )
>
> I know have 2 working fine.  1 and 3 I still can't get to work
> My question about #1 is, how do you know what the relative path is
> relative too?? I my mind it should be relative to the stylesheet that's
> calling it  but in my experience that doesn't work at all.
>
> For example if I have this setup:
> directory
>         -> doc.xsl (which does a dynamic transform with Xalan into an FO
> document)
>         -> logo.jpg
>
> The src="logo.jpg" tag makes FOP complain about  the Invalid URL image.
>
> thanks
> Mike
> On Wednesday, March 13, 2002, at 08:44  AM, Magnus Sjöberg wrote:
>
> > Ok, you got me started. I looked into this and found out the
> > following ;-)
> >
> > In the xsl spec., the src attribute for
> > <fo:external-graphic> is specified to contain a
> > '<uri-specification>'
> > For all I know, this is the URI definition as defined in
> > RFC2396.
> > Looking into this and comparing the three attribute values
> > that failed I came up with this:
> >
> > 1) src="logo.jpg"
> > This should work since 'logo.jpg' is a correct relative URI
> > according to the BNF
> >
> > 2) src="file:./logo.jpg"
> > This should also work since 'file:./logo.jpg' defines a
> > correct absoluteURI.
> >
> > 3) src="file://./logo.jpg"
> > This defines an absolute URI, but the file:// should be
> > followed by a 'server' or a 'reg_name' according to the RFC.
> > I believe that the code parsing the file://./logo.jpg treats
> > the . after 'file://' as a server name, hence the URL error.
> >
> > Of the three I got 1 and 2 working using Fop-0.20.2,
> > Xalan-2.3.0 and Xerces-2.0.0 (which is good, since they s h
> > o u l d work).
> > Example 3 failed, complaining about Invalid Image URL -
> > error on relative URL, which I believe is a correct error
> > message.
> > The relative URL really is incorrect.
> >
> > I also used a relative URI as in
> > src="/root/path/to/images/image.jpg", which worked. (Note
> > the missing file:)
> >
> > Hope this 'clears' up some of the fog.
> >
> > Rgds///
> >       Magnus

--

Secode - Total Internet Security
Magnus Sjöberg
Research And Development

email: [EMAIL PROTECTED]
cell: +46 709 150 710
POTS: +46 8 564 875 05
http://www.secode.com

Internet is to be a safe area for business, transactions and
information exchange

Reply via email to