Resolve an URI relative to base missing on Windows

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Resolve an URI relative to base missing on Windows

Szeak (Register Man)
Hi,

I'm using FOP 2.1.

With the same simple fo file which is including an external image (jpg),
with sam config file, and same fop,
URI resolving to the image is OK on Linux, but generates the below Error
on Windows:

Image not found. URI: images/logo.jpg. (See position 11:67)

If i use url('...') format in src attribute and take the full path, it
works and includes the image, but relative path is not working.

The problem is not related to using FOP from the command line or
embedded mode. You can test from command line easy.

The problem is not related to used output format. (I used PDF and PS)

I have read some problem with URI resolving with the new FOP versions
(from 2.0), but i think that is a new problem.

Please, somebody test this again or i'm waiting for any new info or
mistake with my files or configuration.

I attached my FO and Config to this mail.


Thanks for any help.



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

fop.xconf (3K) Download Attachment
fopwin.xconf (2K) Download Attachment
uritest.fo (537 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Resolve an URI relative to base missing on Windows

Szeak (Register Man)
Hi,

After some tests and try to embed FOP by another way, the result are:
1. If i apply the "Basic usage pattern", than base setting by config file not working on windows.
FopFactory fopFactory = FopFactory.newInstance(new File("C:/Temp/fop.xconf"));

2. If i embed fop, as in the "Using the Configuration File" documentation, and put the baseURI by parameter to FopFactoryBuilder, it works also on windows.
DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
Configuration cfg = cfgBuilder.buildFromFile(new File("C:/Temp/mycfg.xml"));
fopFactoryBuilder = new FopFactoryBuilder(baseURI).setConfiguration(cfg);

So my concrete problem solved, but using fop by any other way the problem occurs.

Szeak

2016-08-08 15:15 keltezéssel, Szeak (Register Man) írta:
Hi,

I'm using FOP 2.1.

With the same simple fo file which is including an external image (jpg), with sam config file, and same fop,
URI resolving to the image is OK on Linux, but generates the below Error on Windows:

Image not found. URI: images/logo.jpg. (See position 11:67)

If i use url('...') format in src attribute and take the full path, it works and includes the image, but relative path is not working.

The problem is not related to using FOP from the command line or embedded mode. You can test from command line easy.

The problem is not related to used output format. (I used PDF and PS)

I have read some problem with URI resolving with the new FOP versions (from 2.0), but i think that is a new problem.

Please, somebody test this again or i'm waiting for any new info or mistake with my files or configuration.

I attached my FO and Config to this mail.


Thanks for any help.


--------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Resolve an URI relative to base missing on Windows

Szeak (Register Man)
Hi,

Problem is not problem, so it was my fault. The Uri scheme i used was not correct, it needs to be started with a slash ('/').
So the correct path is ie.:
/C:/Temp/fop.xconf
And it works with the basic usage poattern of embedding FOP.

Bye.

2016-08-12 08:57 keltezéssel, Szeak (Register Man) írta:
Hi,

After some tests and try to embed FOP by another way, the result are:
1. If i apply the "Basic usage pattern", than base setting by config file not working on windows.
FopFactory fopFactory = FopFactory.newInstance(new File("C:/Temp/fop.xconf"));

2. If i embed fop, as in the "Using the Configuration File" documentation, and put the baseURI by parameter to FopFactoryBuilder, it works also on windows.
DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
Configuration cfg = cfgBuilder.buildFromFile(new File("C:/Temp/mycfg.xml"));
fopFactoryBuilder = new FopFactoryBuilder(baseURI).setConfiguration(cfg);

So my concrete problem solved, but using fop by any other way the problem occurs.

Szeak

2016-08-08 15:15 keltezéssel, Szeak (Register Man) írta:
Hi,

I'm using FOP 2.1.

With the same simple fo file which is including an external image (jpg), with sam config file, and same fop,
URI resolving to the image is OK on Linux, but generates the below Error on Windows:

Image not found. URI: images/logo.jpg. (See position 11:67)

If i use url('...') format in src attribute and take the full path, it works and includes the image, but relative path is not working.

The problem is not related to using FOP from the command line or embedded mode. You can test from command line easy.

The problem is not related to used output format. (I used PDF and PS)

I have read some problem with URI resolving with the new FOP versions (from 2.0), but i think that is a new problem.

Please, somebody test this again or i'm waiting for any new info or mistake with my files or configuration.

I attached my FO and Config to this mail.


Thanks for any help.



--------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email]