I wish I was there. I have been doing a courseware generator with FOP and XSLT. I really like FOP. I created a slideset, and a workbook from the same source. (Just getting started really....)
There are lots and lots of examples that ship with FOP. Its really easy to get started. I got a prototype system up and running in about a day and a half using FOP and XSLT. I am no FOP expert, and I got the slideset to look just like our powerpoint slides. -----Original Message----- From: Rene Stone [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 14, 2002 9:28 AM To: [EMAIL PROTECTED] Subject: [jug-discussion] Answers to FOP questions Hi Everyone, I hope you enjoyed the talk on FOP as much as I did in sharing my experiences. Since there were a lot of questions I couldn't answer at the meeting (not a very good expert, am I?), I've done some research this morning and have answered as best I can, all that I could remember. If I left any out, it wasn't intentional. Just post on the list and I can try to find the answers. Thanks for being such a good audience. Rene 1. Can you have an image as a background with formatting objects? Yes, there is a background-image property. For details, see http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#background-image 2. What versions of Apache tools come with FOP? xerces - 2.0.1 xalan - 2.3.1 avalon - not sure. Jar file has 3/15/2002 date in the file name batik - 1.5 beta 2 xml apis - 1.0 beta 2 3. Is the Driver class threaded? The Driver class looks like it is enabled for threading, but is not itself threaded (ie, it does not extend Thread or implement Runnable. However, some of the methods ARE synchronized (such as run and the various render methods). So you should be able to put calls to the Driver in multiple threads and be considered thread-safe, but this may not be guaranteed if they haven't implemented this functionality entirely. 4. Can you create bar codes with formatting objects? Yes. I found the answer in the FAQ. See http://www.owal.co.uk/cgi-bin/fopfaq.cgi#__929 for details 5. Can you pass in a DOM tree in memory to FOP (instead of an XML file)? The InputHandler class that they've defined that work with XSL requires a File object for the xml file. However, I did find this in the FAQ that would work so that you don't have to make an explicit XML file, as long as you are not doing XSL. For my application, I needed the XML file to be written out anyway, plus I was using XSL, but for everyone's information, here's what the FAQ says: How do I use a DOM Parser with FOP? * If you don't have an XSL stage to your use of FOP you might have a FO template file which you load in, and then change slightly before feeding it to FOP. I did this for some chart printouts. I only needed to change the image URL and some numbers each time. What I previously did was to load up the (almost) FO file with a DOM parser and feed the DOM object to FOP. To get this working lately we had to take the DOM object, serialise it to an XML file in memory, and then use a SAX Parser on that serialised XML. The SAX Parser is then fed to FOP. Note: The render method that this FAQ is talking about is the one I used in my example application and takes a SAX parser as input (the XMLReader class). The Driver class also has a render method that takes a DOM Document class, so I think you can do this even more directly than described above. I think this FAQ answer may be a little old. But if you're using XSL, you can't use the render method that takes the DOM Document class, since that's the only input, so it expects this DOM Document to be in the fo format. 6. What tools exist for creating/editing XML files? Here's some I found in an XML reference book and some that I know of from experience. I can't really recommend any of them because I haven't needed to edit a lot of XML files. Maybe someone else on the list can recommend ones that they've used? XMetal by SoftQuad XML Spy by Icon Software XML Instance by Extensibility JEdit JDeveloper by Oracle SlickEdit Version 7 by MicroEdge 7. What does the PDF file from the application look like if it's more than 1 page? I've attached a PDF file that I created to be more than 1 page. It did a reasonable job of showing the boxes on the next page. And--I did nothing explicit for pagination, although there is stuff you can specify to control it better. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]