Glenn Adams resolved FOP-2595.
    Resolution: Won't Fix

FOP 2 now enforces URL syntax more carefully, while it did not do so in the 
past. The construct url(C/data/resource_store/images/someImage.jpg) is not 
using an absolute URL, rather a relative URL which starts with the directory 
"C", i.e., this is treated as:


You need to use file:///C/... to conform with correct URL syntax.

> 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
>              Labels: newbie
>   Original Estimate: 168h
>  Remaining Estimate: 168h
> 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

This message was sent by Atlassian JIRA

Reply via email to