Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
2.0
-
None
-
windows 8 java 1.6
-
Important
Description
Hi guys.
Using xmlfast I try to put image on page. It creates output
<fo:external-graphic scaling="uniform" content-width="26.5mm" content-height="28.0mm" left="0.0mm" top="0.0mm" position="relative" src="url(C/data/resource_store/images/someImage.jpg)"/>
When I tried to render page image hadn't rendered.
Relative path is working fine
e.g. url('../data/resource_store/images/someImage.jpg').
Absolute url is not resolving correctly. The only way to resolve it is by using "file:" protocol before path
e.g. url('file:C/data/resource_store/images/someImage.jpg').
is working fine.
The problem is located in method class FOUserAgent line 413.
resourceResolver.getResource(uri) throws MalformedURLException with message unknown protocol c:
If you dig little bit deeper you will find that problem is in class NormalResourceResolver on 224 line
return new Resource(uri.toURL().openStream());
uri.toURL throws exception because cannot parse absolute path without protocol..
Fop version 1.1 is rendering absolute path correctly. 2.1 version is impacted either.
Please fix