You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Deheul, Xavier" <xa...@creditlyonnais.fr> on 2002/10/01 12:12:22 UTC

relative img url


i'm trying to use XSL-FO with servlets and i have a strange matter :

My index.xsl begins with some xsl:imports like <xsl:import
src="../use/part1.xsl"> and it's OK,  but when i try to use background-image
in a fo-table, the url "../use/img1.gif" give this message :
"Error creating background image : Error with image URL ... no base
directory is specified"
It's very strange because the url is the same as the import url !!!
It's the same thing with the external-graphic tag

There is no problem with the img URL because the transformation works when i
use a standalone class.

Do you have a idea ?


Re: relative img url

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Deheul, Xavier wrote:

> My index.xsl begins with some xsl:imports like <xsl:import
> src="../use/part1.xsl"> and it's OK,  but when i try to use background-image
> in a fo-table, the url "../use/img1.gif" give this message :
> "Error creating background image : Error with image URL ... no base
> directory is specified"
> It's very strange because the url is the same as the import url !!!
> It's the same thing with the external-graphic tag
xsl transformation and xsl formatting are completly different things, while 
xsl:import search stylesheet to import relative to main stylesheet URI, fop 
searches for an image relative to current jvm directory (user.dir property) 
and then relative to baseDir property. Hence you have set up baseDir (or in 
userconfig.xml or using Configuration class) or alternatively use absolute urls.

-- 
Oleg Tkachenko
Multiconn International, Israel