----- Original Message ----- From: "Keiron Liddle" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 03, 2002 3:17 PM Subject: Re: image protocal in Fop on unix
> > This is really interesting 4 me. > > I would like to set it for the Cocoon FOP Serializer. > > How do you set the basedir programmatically? > > I'd be very grateful if you can indicate the relevant classes/parameters. > > Coccon documentation on how to setup coccon: > http://xml.apache.org/cocoon/userdocs/serializers/pdf-serializer.html > > FOP documentation on how to embed FOP: > http://xml.apache.org/fop/embedding.html > Thank you, but in the docs you indicated there is no reference to base-dir parameters. Is it possible to specify it in Options? I've looked in the code and in AbstractFopImage I have: this.m_imageReader = ImageReaderFactory.Make(this.m_href.toExternalForm(), this.m_href.openStream()); Then I looked in FopImageFactory and found: // maybe relative URL context_url = null; String base = Configuration.getStringValue("baseDir"); if(base == null) { throw new FopImageException("Error with image URL: " + e.getMessage() + " and no base directory is specified"); } try { absoluteURL = new URL(Configuration.getStringValue("baseDir") + absoluteURL.getFile()); } catch (MalformedURLException e_context) { // pb context url throw new FopImageException("Invalid Image URL - error on relative URL : " + e_context.getMessage()); } In the code of the Ant task I found: org.apache.fop.configuration.Configuration.put("baseDir", task.getFofile().getParentFile().toURL().toExternalForm()); Configuration is static :-O Should I use Configuration? Ken -- Nicola Ken Barozzi [EMAIL PROTECTED] These are the days of miracle and wonder... ...so don't cry baby, don't cry... Paul Simon
smime.p7s
Description: application/pkcs7-signature