Oleg Sydorenko created FOP-2595:
-----------------------------------
Summary: When using absolute path in url without protocol fop
cannot resolve it
Key: FOP-2595
URL: https://issues.apache.org/jira/browse/FOP-2595
Project: FOP
Issue Type: Bug
Components: unqualified
Affects Versions: 2.0
Environment: windows 8 java 1.6
Reporter: Oleg Sydorenko
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..
Please fix
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)