If performance is everything, you might look into some of the proprietary PDF engines like faceless.org. But either way I believe you're still going to have to convert your raw xml into something marked up for display, then feed it to the PDF generator. Does anyone have any experieince with faceless compared to FOP performance-wise? Matt
-----Original Message----- From: Jie Wang [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 11, 2002 2:31 PM To: '[EMAIL PROTECTED]' Subject: Possibility of converting from XML to PDF without the intermedia te stage of FO format How to decrease the responding time of converting from XML to PDF ? Currently it took me about 2 Mins to generate my 56 page PDF from XML files. Is that possible to convert from XML to PDF without the intermediate stage of FO format ? Thanks, Jie -----Original Message----- From: Oleg Tkachenko [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] Sent: Tuesday, June 04, 2002 11:47 AM To: [EMAIL PROTECTED] Subject: Re: FOP error with <xsl:copy-of .../> There are no chapter_title or sub formatting objects in xsl-fo, you have to transform it in xslt to fo objects, like <fo:inline> rather than just copying them to the fo. [EMAIL PROTECTED] wrote: > Hi, > > I am attaching the test xsl,xml and the java files. The problem is that the description of any node could have tags and text mixed. If I use <xsl:value-of> (with FOP), I get only > the text and when I use <xsl:copy-of> (without FOP embeded), I get the desired result, but with FOP I am getting 'error 10231' I have tried everything that I could think of and could not come up with the correct stylesheet. > I truly could use your help!!!! > I am anxiously waiting for a solution. > > Thank you so much in advance. > Norm > > --- ERROR --------- > ERROR 10231 [fop ] (): Unknown formatting object null^chapter_title > Exception in thread "main" org.apache.fop.apps.FOPException: java.lang.NullPoin > erException > at org.apache.fop.apps.Driver.render(Driver.java:486) > at test1.main(test1.java:102) > > -------------------- test.xml ---------------------------------- > <?xml version="1.0" encoding="iso-8859-1"?> > <?xml-stylesheet type='text/xsl' href='test.xsl'?> > <document id="DOCUMENT 810-005_103"> > <chapter id="test"> > <chapter_title>Testing Chapter <sub>3</sub></chapter_title> > </chapter> > </document> > > ------------------ test.xsl --------------------------- > <xsl:stylesheet xmlns:xsl=" http://www.w3.org/1999/XSL/Transform <http://www.w3.org/1999/XSL/Transform> " version="1.0" > xmlns:fo=" http://www.w3.org/1999/XSL/Format <http://www.w3.org/1999/XSL/Format> "> > <xsl:template match="document"> > <fo:root xmlns:fo=" http://www.w3.org/1999/XSL/Format <http://www.w3.org/1999/XSL/Format> "> > <fo:layout-master-set> > <fo:simple-page-master page-width="200mm" master-name="Page1" page-height="280mm" > margin-top="10mm" margin-bottom="10mm" margin-left="20mm" margin-right="20mm"> > <fo:region-body margin-top="0mm" margin-bottom="10mm" > margin-left="0mm" margin-right="0mm"/> > </fo:simple-page-master> > <fo:page-sequence-master master-name="PS1"> > <fo:single-page-master-reference master-name="Page1"/> > </fo:page-sequence-master> > </fo:layout-master-set> > > <fo:page-sequence master-reference="Page1"> > <fo:flow flow-name="xsl-region-body"> > <xsl:apply-templates/> > </fo:flow > > </fo:page-sequence > > </fo:root> > </xsl:template> > > <xsl:template match="document/chapter/chapter_title"> > <fo:block space-after="3mm" font-size="14pt" text-align="center" break-before="page" > break-after="page"> > <xsl:copy-of select="."/> > </fo:block> > </xsl:template> > </xsl:stylesheet> > > --------------- test.java file just the main()---------------- > public static void main () { > > File xmlFile=new File("test.xml"); > File xslFile=new File("test.xsl"); > File pdfFile=new File("test.pdf"); > > Logger log = null; > > if(log == null) { > Hierarchy hierarchy = Hierarchy.getDefaultHierarchy(); > log = hierarchy.getLoggerFor("fop"); > log.setPriority(Priority.WARN); > } > FileOutputStream OutFile = new FileOutputStream(pdfFile); > ByteArrayOutputStream out = new ByteArrayOutputStream(); > Driver driver=new Driver(); > > driver.setLogger(log); > driver.setRenderer(Driver.RENDER_PDF); > InputHandler ih=new XSLTInputHandler(xmlFile,xslFile); > XMLReader p=ih.getParser(); > driver.setOutputStream(OutFile); > driver.render(p, ih.getInputSource()); > OutFile.close(); > } > }//main > > > __________________________________________________________________ > Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with [EMAIL PROTECTED] http://shopnow.netscape.com/ <http://shopnow.netscape.com/> > > Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ <http://webmail.netscape.com/> > -- Oleg Tkachenko Multiconn International, Israel