Hi Steve, Steve Ebersole a écrit : > I am having some difficulty getting fop-0.93 to work with DocBook in one very > specific case. I need to tell fop/docbook where to find images, so initially > I tried setting this 'img.src.path' docbook xslt param. This is set to a > fully resolved file path. Actually this works great on my linux box. > > And then a user on windows tried it: > java.net.MalformedURLException: unknown protocol: d <snip/> > So that leaves me with the question of which is correct. Is 'img.src.path' > expected to be a URL, as fop believes?
Yes, see the documentation for the img.src.path parameter: http://docbook.sourceforge.net/release/xsl/current/doc/fo/img.src.path.html This is a prefix that will be added to your image paths and put in the ‘src’ parameter of the fo:external-graphic element, which is itself expecting a URI. So you should specify something like “file://d:path/to/the/images/” which I believe is the correct syntax for specifying drive letters. Note that a relative URI should also work: “../images/”. As this is a URI you must use slashes even on Windows. Mind the final slash, which is important for correct URI resolution. > Also, in general since setting a single 'img.src.path' always seemed kind of > limiting anyway, would it instead make sense to not rely on that and instead > plugin in a URIResolver to find the images (this would obviously not work out > for other docbook formats however)? Via FOUserAgent.setURIResolver() I > mean... What else beside images is this URIResolver asked to resolve? Among other things the URIResolver is used to resolve paths to fonts, so you can’t just override it like that. IIC this method is meant to be used in server environments, where URI resolution is a bit special as there might be some indirection mechanism. You could define a custom URI scheme for images, and plug in a corresponding URIResolver that would defer the resolution of other URIs to the default one. But I’m not sure you really want that. According to the documentation the prefix specified in ‘img.src.path’ won’t be added to absolute paths, so playing with that might be enough for you. You might also get further help on the docbook-apps mailing list. HTH, Vincent --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
