Re: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a
Ooops. I used the build from CVS-HEAD. I now see that the current head is actually Fop-1.0dev. So, indeed for fop0.20.5rc3a my patch is no good! For the current cvs head, it is (take a look at embedding.ExampleFO2PDF.java from the examples) the correct patch, but it's too early for that now. Cheers, Eelco - Original Message - From: "jim moore" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, June 15, 2003 12:46 AM Subject: RE: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a I did some testing today and was able to get opt-fop and friendbook-fop running fine with just replacing fop.jar, batik.jar and the avalon-framework jar with the versions shipping with fop-0.20.5rc3a. I didn't have to modify any opt-fop source code at all. Logging was working and pdf's were coming out fine. Eelco, why did you need to patch the files? Were you seeing errors? Assuming I'm not special and simply swapping out the jars works for everyone, I'm not sure if we need a new release now (especially since the opt-fop source files don't seem to need any changes). I'd probably just rather wait until the final version of fop-0.20.5 is released--then we can do a new release with the new jars if people feel it's necessary. --jim > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > zz-Schnitzer, Jeff > Sent: Monday, June 09, 2003 6:29 PM > To: [EMAIL PROTECTED] > Subject: RE: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a > > > +1 > > I'm all for pressing forward. > > Jeff > > > -Original Message- > > From: jim moore [mailto:[EMAIL PROTECTED] > > Sent: Monday, June 09, 2003 9:59 AM > > To: [EMAIL PROTECTED] > > Subject: Re: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a > > > > Is there any compelling reason to remain backwards compatible? It > seems > > lame > > that we have to give up configurably logging to work with both > versions. > > Maybe we should just patch it completely (i.e. with logging) for the > most > > recent version and do a new release. > > > > People that want the older version can use the previous version of > opt-fop > > but I feel that the release version should be targeted to work with > the > > most > > recent version of fop. > > > > --jim > > > > - Original Message - > > From: "Eelco Hillenius" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Monday, June 09, 2003 12:46 PM > > Subject: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a > > > > > > > Hi all, > > > > > > When using the latest version of FOP (which is the only > version that > > behaves > > > really well with my system) I came across some API changes that > breaks > > > FopTransform from maverick-opt-fop. > > > > > > 1. Options are now only supported for command line operations; 2. > > > The Avalon logger now must be set with 'driver.setLogger(log)' > > instead > > of > > > 'MessageHandler.setScreenLogger(log)'. > > > > > > I do not think 'options' is supported in any other way > now; I could > not > > find > > > any docs about it (though I didn't search the mailing list. As it > not > > really > > > encouraged anyway, imho it's best to just discard it. > > > > > > I've included a path that works with both the older (4) and the > 5rc3a > > > versions of FOP. I do not set a logger though (but have the 5rc3a > > version > > as > > > a comment), as one of the methods breaks one of the > versions. If not > > set, > > > the default (screen-) logger will be used. > > > > > > Eelco > > > > > > > > > > > --- > > This SF.net email is sponsored by: Etnus, makers of TotalView, The > best > > thread debugger on the planet. Designed with thread > debugging features > > you've never dreamed of, try TotalView 6 free at www.etnus.com. > > [INVALID FOOTER] > > > > --- > This SF.net email is sponsored by: Etnus, makers of > TotalView, The best thread debugger on the planet. Designed > with thread debugging features you've never dreamed of, try > TotalView 6 free at www.etnus.com. [INVALID FOOTER] > --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 [INVALID FOOTER] --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 [INVALID FOOTER]
RE: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a
I did some testing today and was able to get opt-fop and friendbook-fop running fine with just replacing fop.jar, batik.jar and the avalon-framework jar with the versions shipping with fop-0.20.5rc3a. I didn't have to modify any opt-fop source code at all. Logging was working and pdf's were coming out fine. Eelco, why did you need to patch the files? Were you seeing errors? Assuming I'm not special and simply swapping out the jars works for everyone, I'm not sure if we need a new release now (especially since the opt-fop source files don't seem to need any changes). I'd probably just rather wait until the final version of fop-0.20.5 is released--then we can do a new release with the new jars if people feel it's necessary. --jim > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > zz-Schnitzer, Jeff > Sent: Monday, June 09, 2003 6:29 PM > To: [EMAIL PROTECTED] > Subject: RE: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a > > > +1 > > I'm all for pressing forward. > > Jeff > > > -Original Message- > > From: jim moore [mailto:[EMAIL PROTECTED] > > Sent: Monday, June 09, 2003 9:59 AM > > To: [EMAIL PROTECTED] > > Subject: Re: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a > > > > Is there any compelling reason to remain backwards compatible? It > seems > > lame > > that we have to give up configurably logging to work with both > versions. > > Maybe we should just patch it completely (i.e. with logging) for the > most > > recent version and do a new release. > > > > People that want the older version can use the previous version of > opt-fop > > but I feel that the release version should be targeted to work with > the > > most > > recent version of fop. > > > > --jim > > > > - Original Message - > > From: "Eelco Hillenius" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Monday, June 09, 2003 12:46 PM > > Subject: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a > > > > > > > Hi all, > > > > > > When using the latest version of FOP (which is the only > version that > > behaves > > > really well with my system) I came across some API changes that > breaks > > > FopTransform from maverick-opt-fop. > > > > > > 1. Options are now only supported for command line operations; 2. > > > The Avalon logger now must be set with 'driver.setLogger(log)' > > instead > > of > > > 'MessageHandler.setScreenLogger(log)'. > > > > > > I do not think 'options' is supported in any other way > now; I could > not > > find > > > any docs about it (though I didn't search the mailing list. As it > not > > really > > > encouraged anyway, imho it's best to just discard it. > > > > > > I've included a path that works with both the older (4) and the > 5rc3a > > > versions of FOP. I do not set a logger though (but have the 5rc3a > > version > > as > > > a comment), as one of the methods breaks one of the > versions. If not > > set, > > > the default (screen-) logger will be used. > > > > > > Eelco > > > > > > > > > > > --- > > This SF.net email is sponsored by: Etnus, makers of TotalView, The > best > > thread debugger on the planet. Designed with thread > debugging features > > you've never dreamed of, try TotalView 6 free at www.etnus.com. > > [INVALID FOOTER] > > > > --- > This SF.net email is sponsored by: Etnus, makers of > TotalView, The best thread debugger on the planet. Designed > with thread debugging features you've never dreamed of, try > TotalView 6 free at www.etnus.com. [INVALID FOOTER] > --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 [INVALID FOOTER]
RE: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a
+1 I'm all for pressing forward. Jeff > -Original Message- > From: jim moore [mailto:[EMAIL PROTECTED] > Sent: Monday, June 09, 2003 9:59 AM > To: [EMAIL PROTECTED] > Subject: Re: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a > > Is there any compelling reason to remain backwards compatible? It seems > lame > that we have to give up configurably logging to work with both versions. > Maybe we should just patch it completely (i.e. with logging) for the most > recent version and do a new release. > > People that want the older version can use the previous version of opt-fop > but I feel that the release version should be targeted to work with the > most > recent version of fop. > > --jim > > - Original Message - > From: "Eelco Hillenius" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, June 09, 2003 12:46 PM > Subject: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a > > > > Hi all, > > > > When using the latest version of FOP (which is the only version that > behaves > > really well with my system) I came across some API changes that breaks > > FopTransform from maverick-opt-fop. > > > > 1. Options are now only supported for command line operations; > > 2. The Avalon logger now must be set with 'driver.setLogger(log)' > instead > of > > 'MessageHandler.setScreenLogger(log)'. > > > > I do not think 'options' is supported in any other way now; I could not > find > > any docs about it (though I didn't search the mailing list. As it not > really > > encouraged anyway, imho it's best to just discard it. > > > > I've included a path that works with both the older (4) and the 5rc3a > > versions of FOP. I do not set a logger though (but have the 5rc3a > version > as > > a comment), as one of the methods breaks one of the versions. If not > set, > > the default (screen-) logger will be used. > > > > Eelco > > > > > > --- > This SF.net email is sponsored by: Etnus, makers of TotalView, The best > thread debugger on the planet. Designed with thread debugging features > you've never dreamed of, try TotalView 6 free at www.etnus.com. > [INVALID FOOTER] --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. [INVALID FOOTER]
Re: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a
Oh, btw... 5rc3a has an additional dependency on commons-io. Eelco - Original Message - From: "jim moore" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 09, 2003 6:59 PM Subject: Re: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a > Is there any compelling reason to remain backwards compatible? It seems lame > that we have to give up configurably logging to work with both versions. > Maybe we should just patch it completely (i.e. with logging) for the most > recent version and do a new release. > > People that want the older version can use the previous version of opt-fop > but I feel that the release version should be targeted to work with the most > recent version of fop. > > --jim > > - Original Message - > From: "Eelco Hillenius" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, June 09, 2003 12:46 PM > Subject: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a > > > > Hi all, > > > > When using the latest version of FOP (which is the only version that > behaves > > really well with my system) I came across some API changes that breaks > > FopTransform from maverick-opt-fop. > > > > 1. Options are now only supported for command line operations; > > 2. The Avalon logger now must be set with 'driver.setLogger(log)' instead > of > > 'MessageHandler.setScreenLogger(log)'. > > > > I do not think 'options' is supported in any other way now; I could not > find > > any docs about it (though I didn't search the mailing list. As it not > really > > encouraged anyway, imho it's best to just discard it. > > > > I've included a path that works with both the older (4) and the 5rc3a > > versions of FOP. I do not set a logger though (but have the 5rc3a version > as > > a comment), as one of the methods breaks one of the versions. If not set, > > the default (screen-) logger will be used. > > > > Eelco > > > > > > --- > This SF.net email is sponsored by: Etnus, makers of TotalView, The best > thread debugger on the planet. Designed with thread debugging features > you've never dreamed of, try TotalView 6 free at www.etnus.com. > [INVALID FOOTER] > > --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. [INVALID FOOTER]
Re: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a
Fine with me... Eelco - Original Message - From: "jim moore" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 09, 2003 6:59 PM Subject: Re: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a > Is there any compelling reason to remain backwards compatible? It seems lame > that we have to give up configurably logging to work with both versions. > Maybe we should just patch it completely (i.e. with logging) for the most > recent version and do a new release. > > People that want the older version can use the previous version of opt-fop > but I feel that the release version should be targeted to work with the most > recent version of fop. > > --jim > > - Original Message - > From: "Eelco Hillenius" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, June 09, 2003 12:46 PM > Subject: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a > > > > Hi all, > > > > When using the latest version of FOP (which is the only version that > behaves > > really well with my system) I came across some API changes that breaks > > FopTransform from maverick-opt-fop. > > > > 1. Options are now only supported for command line operations; > > 2. The Avalon logger now must be set with 'driver.setLogger(log)' instead > of > > 'MessageHandler.setScreenLogger(log)'. > > > > I do not think 'options' is supported in any other way now; I could not > find > > any docs about it (though I didn't search the mailing list. As it not > really > > encouraged anyway, imho it's best to just discard it. > > > > I've included a path that works with both the older (4) and the 5rc3a > > versions of FOP. I do not set a logger though (but have the 5rc3a version > as > > a comment), as one of the methods breaks one of the versions. If not set, > > the default (screen-) logger will be used. > > > > Eelco > > > > > > --- > This SF.net email is sponsored by: Etnus, makers of TotalView, The best > thread debugger on the planet. Designed with thread debugging features > you've never dreamed of, try TotalView 6 free at www.etnus.com. > [INVALID FOOTER] > > --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. [INVALID FOOTER]
Re: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a
Is there any compelling reason to remain backwards compatible? It seems lame that we have to give up configurably logging to work with both versions. Maybe we should just patch it completely (i.e. with logging) for the most recent version and do a new release. People that want the older version can use the previous version of opt-fop but I feel that the release version should be targeted to work with the most recent version of fop. --jim - Original Message - From: "Eelco Hillenius" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 09, 2003 12:46 PM Subject: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a > Hi all, > > When using the latest version of FOP (which is the only version that behaves > really well with my system) I came across some API changes that breaks > FopTransform from maverick-opt-fop. > > 1. Options are now only supported for command line operations; > 2. The Avalon logger now must be set with 'driver.setLogger(log)' instead of > 'MessageHandler.setScreenLogger(log)'. > > I do not think 'options' is supported in any other way now; I could not find > any docs about it (though I didn't search the mailing list. As it not really > encouraged anyway, imho it's best to just discard it. > > I've included a path that works with both the older (4) and the 5rc3a > versions of FOP. I do not set a logger though (but have the 5rc3a version as > a comment), as one of the methods breaks one of the versions. If not set, > the default (screen-) logger will be used. > > Eelco > --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. [INVALID FOOTER]
[Mav-user] maverick-opt-fop with fop-0.20.5rc3a
Hi all, When using the latest version of FOP (which is the only version that behaves really well with my system) I came across some API changes that breaks FopTransform from maverick-opt-fop. 1. Options are now only supported for command line operations; 2. The Avalon logger now must be set with 'driver.setLogger(log)' instead of 'MessageHandler.setScreenLogger(log)'. I do not think 'options' is supported in any other way now; I could not find any docs about it (though I didn't search the mailing list. As it not really encouraged anyway, imho it's best to just discard it. I've included a path that works with both the older (4) and the 5rc3a versions of FOP. I do not set a logger though (but have the 5rc3a version as a comment), as one of the methods breaks one of the versions. If not set, the default (screen-) logger will be used. Eelco Index: FopTransform.java === RCS file: /cvsroot/mav/opt-fop/src/java/org/infohazard/maverick/opt/transform/FopTransform.java,v retrieving revision 1.11 diff -u -r1.11 FopTransform.java --- FopTransform.java 7 Aug 2002 18:03:05 - 1.11 +++ FopTransform.java 9 Jun 2003 16:35:29 - @@ -2,12 +2,10 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; -import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.Reader; -import java.io.StringReader; import java.io.StringWriter; import javax.servlet.ServletConfig; @@ -28,9 +26,8 @@ import org.apache.avalon.framework.logger.Log4JLogger; import org.apache.fop.apps.Driver; import org.apache.fop.apps.FOPException; -import org.apache.fop.apps.Options; -import org.apache.fop.messaging.MessageHandler; import org.apache.log4j.Category; + import org.infohazard.maverick.flow.ConfigException; import org.infohazard.maverick.flow.Transform; import org.infohazard.maverick.flow.TransformContext; @@ -41,7 +38,9 @@ import org.xml.sax.ContentHandler; import org.xml.sax.InputSource; - +/** + * This Transform runs the input (XSL:FO) through the apache FOP processor + */ public class FopTransform implements Transform { @@ -51,7 +50,6 @@ protected static final String ATTR_OUTPUT = "output"; protected static final String ATTR_DISPOSITION_TYPE = "disposition-type"; protected static final String ATTR_FILENAME = "filename"; - protected static final String ATTR_CONFIG = "config"; protected TransformerFactory tFactory = TransformerFactory.newInstance(); @@ -64,23 +62,15 @@ */ protected String filename; - - protected String configPath = null; - - public FopTransform(Element transformNode, ServletConfig servletCfg) throws ConfigException - + public FopTransform(Element transformNode, ServletConfig servletCfg) + throws ConfigException { this.setOutput(XML.getValue(transformNode, ATTR_OUTPUT)); this.filename = XML.getValue(transformNode, ATTR_FILENAME); - - String path = XML.getValue(transformNode, ATTR_CONFIG); - if (path!=null) - { - this.configPath = servletCfg.getServletContext().getRealPath(path); - } } - public void setOutput(String output) throws ConfigException { + public void setOutput(String output) throws ConfigException + { if (output != null) { if (output.equalsIgnoreCase("pdf")) @@ -248,24 +238,14 @@ private void go(InputSource input) throws IOException, ServletException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); - Log4JLogger dlog = new Log4JLogger(fopDriverLog); - MessageHandler.setScreenLogger(dlog); - try { - Options options = null; - - //load userconfig file if specified - if (configPath != null) - { - //load the user config file if specified - options = new Options(new File(configPath)); - } else { - //try and load the standard options off of the classpath - options = new Options(); - } Driver driver = new Driver(input, baos); - driver.setLogger(dlog); + Log4JLogger dlog = new Log4JLogger(fopDriverLog); + + // works with fop-0.20.5rc3a +