Would you recommend using XSLTransform to do this?
Oh, and thanks for the advice I am going to do as you suggest.
Erich

-----Original Message-----
From: COFFMAN Steven [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 24, 2001 11:40 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Getting started FOP question


When debugging, it's a good idea to run any XSL:T seperate from processing
the result XSL:FO so you can figure out which part is messing up if there
are problems. If you see <xsl:*> tags in in your FO, you've got a problem in
your XSL:T. While FOP can be asked to convert XSL:T to XSL:FO and then
process it, this really isn't an atomic operation.

You can't split an FO result into more than one document without getting
more than one PDF output result.

Hope this helps.
-Steve


-----Original Message-----
From: Kilmer, Erich [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 24, 2001 10:57 AM
To: [EMAIL PROTECTED]
Subject: Getting started FOP question


A while back I was playing with Cocoon1 and got it working. I was able to
convert XML input to PDF output (via an XSL) on the fly in a browser.
Recently, I was using Stylus Studio to build an XSL with FO tags and then
rendered it into PDF (inside Stylus). At this point I realized maybe I do
not need Cocoon1 to do this all I need is FOP. This would probably be better
because Cocoon1 requires changes to my apps server jar file (orion.jar) in
order to work. 
So I am trying to get FOP to work now. I have made my own version of the
FOPServlet and added it to Orion. Then I added fop.jar, batik.jar, xalan and
xerces jars to the <orion>/lib dir.

One thing, my XML file references my XSL file (which contains XSL/FO tags
and XPATH).

Question:  Is this OK to do? 

Most of the FO examples only use the FO tags.
I am getting this error in my browser window:

500 Internal Server Error
org.apache.fop.apps.FOPException: The root element is required in a
well-formed document.
        at org.apache.fop.apps.Driver.render(Driver.java:429)
        at org.apache.fop.apps.Driver.run(Driver.java:508)
        at
com.bellhowell.eroute.report.web.PDFGenerator.renderFO(PDFGenerator.java:72)
        at
com.bellhowell.eroute.report.web.PDFGenerator.service(PDFGenerator.java:45)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
--------
org.xml.sax.SAXParseException: The root element is required in a well-formed
document. 
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1056) 
at
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocume
ntScanner.java:626) 
at
org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.endOfInput(
XMLDocumentScanner.java:842) 
at
org.apache.xerces.framework.XMLDocumentScanner.endOfInput(XMLDocumentScanner
.java:418) 
at
org.apache.xerces.validators.common.XMLValidator.sendEndOfInputNotifications
(XMLValidator.java:582) 
at
org.apache.xerces.readers.DefaultEntityHandler.changeReaders(DefaultEntityHa
ndler.java:1026) 
at
org.apache.xerces.readers.XMLEntityReader.changeReaders(XMLEntityReader.java
:168) 
at org.apache.xerces.readers.UTF8Reader.changeReaders(UTF8Reader.java:182) 
at org.apache.xerces.readers.UTF8Reader.lookingAtChar(UTF8Reader.java:197) 
at
org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.dispatch(XM
LDocumentScanner.java:742) 
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:381) 
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948) 
at org.apache.fop.apps.Driver.render(Driver.java:424) 
at org.apache.fop.apps.Driver.run(Driver.java:508) 
at
com.bellhowell.eroute.report.web.PDFGenerator.renderFO(PDFGenerator.java:72)

at
com.bellhowell.eroute.report.web.PDFGenerator.service(PDFGenerator.java:45) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) 

Any ideas what could cause this?
Thanks!

Erich Kilmer




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to