RE: FOP being very slow.
On Mon, 2004-01-12 at 19:56, Roland Neilands wrote: Well we are running this application on UNIX machines. From where did you get hint that its running on windows.. Then we can use the java -server optimizing JVM. But where exactly to use it. fop.sh, last line, just add -server after java I forgot that he is running in websphere. Anyone know which servlet container is used by websphere ? Does it use the SUN or IBM SDK ? [Sent him a program offline ... and explained that I saw a DOS (I mean WINDOWS) file name in his Code.] -- John Austin [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Need assistance in diagnosing error message.
This problem was corrected by simply placing the XML tag on line 1 column 1. It was indented a couple of spaces. From: Clay Leeds [EMAIL PROTECTED] Date: 2004/01/09 Fri PM 12:10:22 EST To: [EMAIL PROTECTED] Subject: Re: Need assistance in diagnosing error message. Glad to hear the problem is resolved! If it's not too much trouble, please report back the error to the list, so that the thread will be complete. Someone else with the same or similar problem, may follow the list, but not have a resolution to the problem. Web Maestro Clay On Jan 9, 2004, at 8:47 AM, [EMAIL PROTECTED] wrote: Ok found my error. Thanks for the replys. From: [EMAIL PROTECTED] Date: 2004/01/09 Fri AM 11:31:48 EST To: [EMAIL PROTECTED] Subject: RE: Need assistance in diagnosing error message. javax.servlet.ServletException: The processing instruction target matching [xX][mM][lL] is not allowed I don't exactly remember, I think it comes from an org.xml.sax.SAXParseException. Check your FO tree (or XSL or XML source), post it if you can't find your error. Mathieu. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Turning off inappropriate errors?
Hello, I have an XSL-FO file that I want to generate into PDF. Along with the usual FO content, the file contains miscellaneous attributes that are not part of the XSL namespace. My goal is to embed a variety of custom tags into the FO I'm generating that will later be used by an in-house automated testing tool. According to the XSL-FO spec, I should be able to do this. Specifically, section 2.2 of the spec states the following: An element from the XSL namespace may have any attribute not from the XSL namespace, provided that the expanded-name of the attribute has a non-null namespace URI. The presence of such attributes must not change the behavior of XSL elements and functions defined in this document. Thus, an XSL processor is always free to ignore such attributes, and must ignore such attributes without giving an error if it does not recognize the namespace URI. Such attributes can provide, for example, unique identifiers, optimization hints, or documentation. Despite this statement in the XSL-FO spec, I find that FOP gives me a bunch of error messages like this: [ERROR] property 'xform:resourcePath' ignored Obviously, FOP is correctly ignoring the stuff it does not recognize. However, this does not comply with the spec which says that this condition should not give an error. Is there any way to configure FOP so that it will not flag these attributes from an unrecognized namespace as errors? I don't want to turn off the flagging of real errors, just these particular ones that probably shouldn't be there. Any ideas? Thanks, - Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FOP being very slow.
On Mon, 2004-01-12 at 20:36, John Austin wrote: In summary, I sent him my sample program and then reworked some of that program to eliminate communication through files. The sample program reads an external XML file generated from an Access DataBase. Transformation 1 generates a DOMResult which contains up to about 400 records from the DB. They only add about 1k each to the memory requirements. Transformation 2 reads a new DOMSource( theDOMResult.getNode() ); and generates a SAXResult() that uses the FOP Driver to write a PDF file. This demonstrates enough performance improvements to cut down his execution time significantly. I also pointed out that LOGGING is a performance hog. This is mentioned on the Cocoon list from time to time. In one case I got a 20% improvement for an 80 page PDF. When he absorbs this, (and if he comes back) I might point him towards some material on servlets and re-using his compiled XSLT stylesheets. -- John Austin [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP being very slow.
On Jan 13, 2004, at 10:33 AM, John Austin wrote: I also pointed out that LOGGING is a performance hog. This is mentioned on the Cocoon list from time to time. In one case I got a 20% improvement for an 80 page PDF. Just out of curiosity, is there a way (perhaps via avalon?) of logging every nth (10th, 100th, 1000th, etc.) rendering? That way, one might be able to gather aggregate data, but not have as much of a performance penalty. Web Maestro Clay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FOP being very slow.
Yes, logging appears to be overdone within FOP, even if a NULL logger object is chosen, a lot of function calls are still being made. I haven't researched Xalan much yet, but their system may be a good guide on the amount of logging appropriate for our system. Glen --- John Austin [EMAIL PROTECTED] wrote: I also pointed out that LOGGING is a performance hog. This is mentioned on the Cocoon list from time to time. In one case I got a 20% improvement for an 80 page PDF. __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP being very slow.
Talking about performance: It might be a good idea to buffer to OutputStream. driver.setOutputStream(new BufferedOutputStream(new java.io.FileOutputStream( pdfFile ))); On 12.01.2004 21:51:09 John Austin wrote: driver.setOutputStream( new java.io.FileOutputStream( pdfFile ) ); Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE : renderer postscript : border painting
Salut Philippe I haven't had time, yet, to run the debugger, but I think it's pretty obvious now what going wrong. If you look that PostScript file you sent me in a text editor you can see that there is a line 1.0 1.0 1.0 setrgbcolor at the beginning of page 1 which is missing on page 2. You can patch src/org/apache/fop/render/ps/PSRenderer.java. Find the method useColor(float, float, float) and remove the line with the if. This will disable a dumb and obviously buggy optimization attempt. It will certainly increase the size of the PostScript file for the moment but should get rid of the bug. Rebuild FOP after modifying. If I find some time I'll see if I can find a better solution. I probably have the same problem in the dev version. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP being very slow.
On Tue, 2004-01-13 at 17:49, Jeremias Maerki wrote: Talking about performance: It might be a good idea to buffer to OutputStream. driver.setOutputStream(new BufferedOutputStream(new java.io.FileOutputStream( pdfFile ))); On 12.01.2004 21:51:09 John Austin wrote: driver.setOutputStream( new java.io.FileOutputStream( pdfFile ) ); Well spotted! It also needs: java.io.PrintWriter pw = new java.io.PrintWriter( new java.io.BufferedWriter( new java.io.FileWriter( inputFile ) ) ); and similar treatment for the StreamSources used to read in the XML and XSLT files. There might be some improvement there, but it is down near the noise. -- John Austin [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP being very slow.
John Austin wrote: and similar treatment for the StreamSources used to read in the XML and XSLT files. That's usually uncritical, because XML parsers tend to buffer themself. IIRC recent Xerces uses an 8k buffer by default (which means you get long stretches of XML text as a series of characters() events, each dumping 8k text on you). J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: configuration problem: hyphenation
Kyle Kotwica wrote: Using either form of the URL suggested. The comment meant: 1. file:///\fop\fop-0.20.5\conf While it is a syntatcically valid URL, it probably wont work as expected, i.e. it does not address the file system object \fop\fop-0.20.5\conf 2. file:///\fop\fop-0.20.5\conf This will address the file system object \fop\fop-0.20.5\conf, but it's still no use because 3. The config setting is not an URL, but realy a directory name (path name). You should use \fop\fop-0.20.5\conf or C:\fop\fop-0.20.5\conf or whatever drive you use. Running under -d I do get [DEBUG] user configuration file: \fop\fop-0.20.5\conf\userconfig.xml but no more about en_US.xml other then the message: [ERROR] Couldn't find hyphenation pattern en_US using general language pattern en instead. Oops, debug dumps are controlled by a static variable in the hyphenator, and are by default disabled. You can enable it by doing the following: 1. Get a JDK and the FOP source distro. 2. Open the file src/org/apache/fop/layout/hyphenation/Hyphenator.java in a text editor 3. Change the initialization of the errorDump variable to true. 4. Recompile by running build.bat. I still believe the cause of the problem is malformed XML, perhaps an encoding problem. Use another XML tool (not XML Spy) to verify your XML is free of this problems. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: configuration problem: hyphenation
On Tue, 2004-01-13 at 19:14, J.Pietschmann wrote: Kyle Kotwica wrote: Using either form of the URL suggested. The comment meant: 1. file:///\fop\fop-0.20.5\conf While it is a syntatcically valid URL, it probably wont work as expected, i.e. it does not address the file system object \fop\fop-0.20.5\conf 2. file:///\fop\fop-0.20.5\conf This will address the file system object \fop\fop-0.20.5\conf, but it's still no use because 3. The config setting is not an URL, but realy a directory name (path name). I thought that Java correctly translates forward slash to the System property file-separator setting, in the appropriate places. -- John Austin [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: configuration problem: hyphenation
J.Pietschmann wrote: 2. file:///\fop\fop-0.20.5\conf Darn, should be file:///fop/fop-0.20.5/conf of course. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Turning off inappropriate errors?
J.Pietschmann wrote: Timothy Dean wrote: Is there any way to configure FOP so that it will not flag these attributes from an unrecognized namespace as errors? There is no easy way to configure FOP this way. Your best bet is to disable the message in the source and recompile. J.Pietschmann What's your environment? Some un*x, Windows, or Mac, or ??? What about piping the output through something like so: fop_cmd infile.fo outfile.pdf | \ grep -Ev 'namespace:|\[info\]|anything-else-annoying' a workable grep string could be: grep -Ev 'ignored$|not implemented yet$' --jim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: configuration problem: hyphenation
-Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED] J.Pietschmann wrote: 2. file:///\fop\fop-0.20.5\conf Darn, should be file:///fop/fop-0.20.5/conf of course. Sorry if it's contagious :) Cheers, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]