VS: XML, XSL a real problem
here you have a working servlet XMLtoPDFServlet.java it is using older Xalan version I do not feel comfortable with sending my XML and XSL files because they are connected with my work you can easily find correct-syntax examples from wrox (making xml and xsl guide books) web site -Teemu -Alkuperäinen viesti- Lähettäjä:Zahigian, Mike [SMTP:[EMAIL PROTECTED] Lähetetty:1. helmikuuta 2002 19:04 Vastaanottaja:'[EMAIL PROTECTED]' Aihe: XML, XSL a real problem Has anybody managed to get a Java Servlet to accept xml, xsl stylesheet including fo and render to pdf? I've been struggling for days and am running out of time before I have to abandon FOP for this project. If possible, include your xml, xsl, and servlet code so I can work from there. Thanks in advance for any help. Mike Zahigian Business Information Systems x72819 XMLtoPDFServlet.java Description: Binary data
Regarding Lists
Hi, I've an xml as something like below NODE name=A xyza/xyz NODE name=B xyzb/xyz NODE name=C xyzc/xyz /NODE /NODE /NODE NODE name=D xyzd/xyz NODE name=E xyze/xyz NODE name=F xyzf/xyz /NODE /NODE /NODE And in my output PDF File, i want an output as below A page.1 B page.2 C page.3 D page.4 Epage.5 Is it possible to achieve the same without using tables? Please reply soon. Regds, Meena
Re: FOPException: no protocol (embedded in servlet)
Sebastian Will [EMAIL PROTECTED] wrote: Your help is much appreciated. I searched through the available archives (most of them seem to be down), but I cannot find some better way to implement a convert-xml-to-fo-with-xsl-and-render-that-without-writing-to-FS rendering. That's odd. Since Version 0.20.x or something, FOP is delivered with a XSLTInputHandler class. Look it up in the documentation, or in the archive: http://marc.theaimsgroup.com/?l=fop-devw=2r=1s=XSLTInputHandler%28q=b If you are sure your XSLT processor supports SAXResults (Xalan does), you can use a TraxInputHandler directly. Unfortunately, both XSLTInputHandler and TraxInputHandler take only files, both for the XML source and the XSLT. This is bad if you get character streams, SAX streams or DOM trees from elsewhere (e.g. from a DB or a web service). In this case you can use a SAX event stream to get the transformation result into FOP, roughly like this: // however you want to set up your transformation Transformer transformer=TransformerFactory.newInstance().newTransformer(xsltSource); // prepare FOP Driver driver=new Driver(); driver.setOutputStream(...); driver.setRenderer(RENDER_PDF); transformer.transform(xmlSource, new SAXResult(driver.getContentHandler())); The above is slightly simplified and untested. You don't have to call driver.render() or run(), as the rendering is driven by the SAX stream coming from the transformation. Note that the FOP output stream and the renderer has to be set before getContentHandler() is called. Regards J.Pietschmann
Reading from HTML
Hi, I've an xml like the below chapter node-ref="a" /privilege chapter node-ref="a.b" /privilege chapter node-ref="a.b.c" /privilege /chapter /chapter /chapter and an HTML file like the below Name Value aA a.bB a.b.cC I need a template that has to read the value for that node(for instance, "a.b.c") from the html file. If no value is existing, then it has to take the value of its parent node.(a.b) If even this node doesnt hv the value, then it should take value from the second nodes parent node(a) How to achieve this?? Regds, Meena
FOP in server
Can someone help us? I want to call FOP from server. But FOP don't respond. There aren't any PDF file, there aren't any Exception... How can I execute FOP?
FOP Weakness
Hi All, I have three questions regarding FOP. First of all, does anyone know what FOP stands for? My guess File object program. Second question is regarding the FOP performance. I notice that every time FOP runs on Jakarta Tomcat 4.0, the cpu usage is almost 100%. This is not good if we are running other applications on the same server. Anyone experiencing such problem? Do you have a solution? Does increasing heap size make any difference? My final question is regarding FOP scability. I have been doing numerous tests on FOP using Loadrunner, a simulation application that allows us to specify certain number of users and number of requests. When making large number of requests to jakarta Tomcat and FOP to generate pdfs, I kept on getting socket write error (java.net.socketException Error: connection reset by peer: socket write error). Anyone know what cause this error? On the web, it said this error is caused by browser and it's not big deal. Thanks for you help, I look forward to your expert opinion. Dave
Re: FOP Weakness
Xie, David (IPCG-NJ) wrote: Hi All, I have three questions regarding FOP. First of all, does anyone know what FOP stands for? My guess File object program. Second question is regarding the FOP performance. I notice that every time FOP runs on Jakarta Tomcat 4.0, the cpu usage is almost 100%. This is not good if we are running other applications on the same server. Anyone experiencing such problem? Do you have a solution? Does increasing heap size make any difference? My final question is regarding FOP scability. I have been doing numerous tests on FOP using Loadrunner, a simulation application that allows us to specify certain number of users and number of requests. When making large number of requests to jakarta Tomcat and FOP to generate pdfs, I kept on getting socket write error (java.net.socketException Error: connection reset by peer: socket write error). Anyone know what cause this error? On the web, it said this error is caused by browser and it's not big deal. Thanks for you help, I look forward to your expert opinion. Dave FOP = Formatting Objects Processor ; FO is an extension to the XSL standard Performance, FOP takes a lot of memory. To get 200ppm processing, I'm estimating 2GB memory on the system + memory for the database and web server. Improvements in the memory footprint are scheduled to be started not soon Hey! What do you want? memory is cheap. Scalability. If you provide it with scalable amounts of memory, the performance is fairly linear.
Re: FOP Weakness
Chuck Paussa wrote: Performance, FOP takes a lot of memory. To get 200ppm processing, I'm estimating 2GB memory on the system + memory for the database and web server. Improvements in the memory footprint are scheduled to be started not soon Hey! What do you want? memory is cheap. Hmm... Interesting estimates. However, while memory is indeed cheap (at least on intel achitectures, for enterprise-grade machines it most certainly is not). If you are suggesting a 2GB heap size, the garbage collection times will kill you. I'm experimenting with running Jini services to do the processing (or maybe a JavaSpace, later), then we can have as many processors as required - not one gigantic process I would also suggest in the future trying to make inherently parallel tasks run in multiple threads. I have about 8 processors available to me, but FOP appears to run in 1 uber-thread. Cheers James
Re: XML : FOP
EXT-Reddy, Swathi A wrote: Hi, I am new to XML FOP. I saw your message about Re: How to avoid using too much memory to create relatively large PDF file. I created an XML file with PAGE tags. In my XSL file, I am using the following code to do page breaks - xsl:apply-templates select=page/ fo:page-sequence master-name=master-sequence fo:static-content flow-name=header . I have a document that will generate 3000 pages. Is this conversion to PDF is feasible using FOP? Thanks. Swathi Reddy (206)544-8542 [EMAIL PROTECTED] Swathi, That's what you should do if you already exactly know the contents of each page (such as your standard main-frame reports where text fields are truncated and/or the page breaks are pre-calculated when data wraps.) If there is a lot of free-form text and you want FOP to deal with text placement, then producing sections of pages that are less than 50 pages should be fine. (Also, you should post your questions to the list rather than sending them directly to me.) Chuck