Re: Apache FOP Newbie needs Help Converting XML to PDF
Hi, Can you tell us exactly which files you are using when you invoke fop, please. Your command should look something like fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf judging by the files you have attached. I am guessing you missed out the -xml/-xsl flags, leading FOP to believe you were supplying an FO file. When an XML and XSL files are supplied, FOP will perform an XSLT transform using the Xalan XSLT Xalan library (I am guessing you will need to know more about this stage in your project), generating the FO document stream that is then processed to generate the output in the desired format: XML + XSL - [XSLT transformer] - FO - [XSL:FO processor] - PDF This initial stage just saves on from having to do the transform first. I hope this info helps, Peter On Wed, Mar 9, 2011 at 12:43 PM, italocardwell italo.cardw...@gmail.com wrote: Ill be upfront I know nothing about XML. I am a SQL developer and I have a project where I need to convert XML files to a PDF. The XML are going to be the same format every time with different data in them. I am wanting to use apache fop 1.0 at the command line to convert these. I am getting an error every time that I attempt to do this. I will attach the files and the error. Would someone please help me out. Thanks. http://old.nabble.com/file/p31105999/a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml http://old.nabble.com/file/p31105999/ccr.xsl ccr.xsl http://old.nabble.com/file/p31105999/date.format-date.template.xsl date.format-date.template.xsl http://old.nabble.com/file/p31105999/str.padding.template.xsl str.padding.template.xsl The error that I get states that fo needs to be in xml-fo format. -- View this message in context: http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31105999.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Apache FOP Newbie needs Help Converting XML to PDF
I was using fop -xm la91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml -xsl ccr.xsl -pdf test.pdf Peter Hancock-2 wrote: Hi, Can you tell us exactly which files you are using when you invoke fop, please. Your command should look something like fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf judging by the files you have attached. I am guessing you missed out the -xml/-xsl flags, leading FOP to believe you were supplying an FO file. When an XML and XSL files are supplied, FOP will perform an XSLT transform using the Xalan XSLT Xalan library (I am guessing you will need to know more about this stage in your project), generating the FO document stream that is then processed to generate the output in the desired format: XML + XSL - [XSLT transformer] - FO - [XSL:FO processor] - PDF This initial stage just saves on from having to do the transform first. I hope this info helps, Peter On Wed, Mar 9, 2011 at 12:43 PM, italocardwell italo.cardw...@gmail.com wrote: Ill be upfront I know nothing about XML. I am a SQL developer and I have a project where I need to convert XML files to a PDF. The XML are going to be the same format every time with different data in them. I am wanting to use apache fop 1.0 at the command line to convert these. I am getting an error every time that I attempt to do this. I will attach the files and the error. Would someone please help me out. Thanks. http://old.nabble.com/file/p31105999/a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml http://old.nabble.com/file/p31105999/ccr.xsl ccr.xsl http://old.nabble.com/file/p31105999/date.format-date.template.xsl date.format-date.template.xsl http://old.nabble.com/file/p31105999/str.padding.template.xsl str.padding.template.xsl The error that I get states that fo needs to be in xml-fo format. -- View this message in context: http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31105999.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31106656.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
RE: Apache FOP Newbie needs Help Converting XML to PDF
-xm? Try -xml? Then take the dashes out of your file name, or try putting it in quotes. -Original Message- From: italocardwell [mailto:italo.cardw...@gmail.com] Sent: Wednesday, March 09, 2011 9:10 AM To: fop-users@xmlgraphics.apache.org Subject: Re: Apache FOP Newbie needs Help Converting XML to PDF I was using fop -xm la91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml -xsl ccr.xsl -pdf test.pdf Peter Hancock-2 wrote: Hi, Can you tell us exactly which files you are using when you invoke fop, please. Your command should look something like fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf judging by the files you have attached. I am guessing you missed out the -xml/-xsl flags, leading FOP to believe you were supplying an FO file. When an XML and XSL files are supplied, FOP will perform an XSLT transform using the Xalan XSLT Xalan library (I am guessing you will need to know more about this stage in your project), generating the FO document stream that is then processed to generate the output in the desired format: XML + XSL - [XSLT transformer] - FO - [XSL:FO processor] - PDF This initial stage just saves on from having to do the transform first. I hope this info helps, Peter On Wed, Mar 9, 2011 at 12:43 PM, italocardwell italo.cardw...@gmail.com wrote: Ill be upfront I know nothing about XML. I am a SQL developer and I have a project where I need to convert XML files to a PDF. The XML are going to be the same format every time with different data in them. I am wanting to use apache fop 1.0 at the command line to convert these. I am getting an error every time that I attempt to do this. I will attach the files and the error. Would someone please help me out. Thanks. http://old.nabble.com/file/p31105999/a91ec9d3-e021-4e5e-933f-54992cdc 415c.20110308172937.xml a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml http://old.nabble.com/file/p31105999/ccr.xsl ccr.xsl http://old.nabble.com/file/p31105999/date.format-date.template.xsl date.format-date.template.xsl http://old.nabble.com/file/p31105999/str.padding.template.xsl str.padding.template.xsl The error that I get states that fo needs to be in xml-fo format. -- View this message in context: http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to- PDF-tp31105999p31105999.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31106656.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
RE: Apache FOP Newbie needs Help Converting XML to PDF
Sorry the -xm was a fat finger. I was using -xml and even if I change the file name to test it still produces the same error. Complete error below. SEVERE: Exception javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: First element must be the fo:root formatting object. Found (Namespace URI: , Local Name: html) instead. Please make sure you're producing a valid XSL-FO do cument. Eric Douglas wrote: -xm? Try -xml? Then take the dashes out of your file name, or try putting it in quotes. -Original Message- From: italocardwell [mailto:italo.cardw...@gmail.com] Sent: Wednesday, March 09, 2011 9:10 AM To: fop-users@xmlgraphics.apache.org Subject: Re: Apache FOP Newbie needs Help Converting XML to PDF I was using fop -xm la91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml -xsl ccr.xsl -pdf test.pdf Peter Hancock-2 wrote: Hi, Can you tell us exactly which files you are using when you invoke fop, please. Your command should look something like fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf judging by the files you have attached. I am guessing you missed out the -xml/-xsl flags, leading FOP to believe you were supplying an FO file. When an XML and XSL files are supplied, FOP will perform an XSLT transform using the Xalan XSLT Xalan library (I am guessing you will need to know more about this stage in your project), generating the FO document stream that is then processed to generate the output in the desired format: XML + XSL - [XSLT transformer] - FO - [XSL:FO processor] - PDF This initial stage just saves on from having to do the transform first. I hope this info helps, Peter On Wed, Mar 9, 2011 at 12:43 PM, italocardwell italo.cardw...@gmail.com wrote: Ill be upfront I know nothing about XML. I am a SQL developer and I have a project where I need to convert XML files to a PDF. The XML are going to be the same format every time with different data in them. I am wanting to use apache fop 1.0 at the command line to convert these. I am getting an error every time that I attempt to do this. I will attach the files and the error. Would someone please help me out. Thanks. http://old.nabble.com/file/p31105999/a91ec9d3-e021-4e5e-933f-54992cdc 415c.20110308172937.xml a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml http://old.nabble.com/file/p31105999/ccr.xsl ccr.xsl http://old.nabble.com/file/p31105999/date.format-date.template.xsl date.format-date.template.xsl http://old.nabble.com/file/p31105999/str.padding.template.xsl str.padding.template.xsl The error that I get states that fo needs to be in xml-fo format. -- View this message in context: http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to- PDF-tp31105999p31105999.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31106656.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31106816.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Apache FOP Newbie needs Help Converting XML to PDF
It seems that date.format-date.template.xsl is unavailable. I suggest that you generate the fo first from the relavent xml and xsl (this is out of scope of this mailing list - help can be found on other mailing lists like http://www.mulberrytech.com/xsl/xsl-list/), and then post the corresponding fo to this list if you are still having problems processing it with FOP. Thanks, Peter On Wed, Mar 9, 2011 at 2:25 PM, italocardwell italo.cardw...@gmail.com wrote: Sorry the -xm was a fat finger. I was using -xml and even if I change the file name to test it still produces the same error. Complete error below. SEVERE: Exception javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: First element must be the fo:root formatting object. Found (Namespace URI: , Local Name: html) instead. Please make sure you're producing a valid XSL-FO do cument. Eric Douglas wrote: -xm? Try -xml? Then take the dashes out of your file name, or try putting it in quotes. -Original Message- From: italocardwell [mailto:italo.cardw...@gmail.com] Sent: Wednesday, March 09, 2011 9:10 AM To: fop-users@xmlgraphics.apache.org Subject: Re: Apache FOP Newbie needs Help Converting XML to PDF I was using fop -xm la91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml -xsl ccr.xsl -pdf test.pdf Peter Hancock-2 wrote: Hi, Can you tell us exactly which files you are using when you invoke fop, please. Your command should look something like fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf judging by the files you have attached. I am guessing you missed out the -xml/-xsl flags, leading FOP to believe you were supplying an FO file. When an XML and XSL files are supplied, FOP will perform an XSLT transform using the Xalan XSLT Xalan library (I am guessing you will need to know more about this stage in your project), generating the FO document stream that is then processed to generate the output in the desired format: XML + XSL - [XSLT transformer] - FO - [XSL:FO processor] - PDF This initial stage just saves on from having to do the transform first. I hope this info helps, Peter On Wed, Mar 9, 2011 at 12:43 PM, italocardwell italo.cardw...@gmail.com wrote: Ill be upfront I know nothing about XML. I am a SQL developer and I have a project where I need to convert XML files to a PDF. The XML are going to be the same format every time with different data in them. I am wanting to use apache fop 1.0 at the command line to convert these. I am getting an error every time that I attempt to do this. I will attach the files and the error. Would someone please help me out. Thanks. http://old.nabble.com/file/p31105999/a91ec9d3-e021-4e5e-933f-54992cdc 415c.20110308172937.xml a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml http://old.nabble.com/file/p31105999/ccr.xsl ccr.xsl http://old.nabble.com/file/p31105999/date.format-date.template.xsl date.format-date.template.xsl http://old.nabble.com/file/p31105999/str.padding.template.xsl str.padding.template.xsl The error that I get states that fo needs to be in xml-fo format. -- View this message in context: http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to- PDF-tp31105999p31105999.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31106656.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31106816.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional
RE: Apache FOP Newbie needs Help Converting XML to PDF
That error means exactly what it says. The file you're passing with the -xsl parameter is incorrect. It's not xslfo. Your xsl file is designed for viewing xml in a browser, not for transforming xml into a document. HTML xsl (http://www.w3schools.com/xsl/default.asp) Xslfo (http://www.w3schools.com/xslfo/xslfo_documents.asp) That xslfo page shows how to create the fo which would be the xsl combined with xml, as it doesn't have the stylesheet tag. The file FOP is looking for on the -xsl parameter is the combination of those, with the stylesheet tag and the fo:root tag. The FO tutorials explain how you can mix the xsl and fo together (http://www.w3schools.com/xslfo/xslfo_xslt.asp). -Original Message- From: italocardwell [mailto:italo.cardw...@gmail.com] Sent: Wednesday, March 09, 2011 9:26 AM To: fop-users@xmlgraphics.apache.org Subject: RE: Apache FOP Newbie needs Help Converting XML to PDF Sorry the -xm was a fat finger. I was using -xml and even if I change the file name to test it still produces the same error. Complete error below. SEVERE: Exception javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: First element must be the fo:root formatting object. Found (Namespace URI: , Local Name: html) instead. Please make sure you're producing a valid XSL-FO do cument. Eric Douglas wrote: -xm? Try -xml? Then take the dashes out of your file name, or try putting it in quotes. -Original Message- From: italocardwell [mailto:italo.cardw...@gmail.com] Sent: Wednesday, March 09, 2011 9:10 AM To: fop-users@xmlgraphics.apache.org Subject: Re: Apache FOP Newbie needs Help Converting XML to PDF I was using fop -xm la91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml -xsl ccr.xsl -pdf test.pdf Peter Hancock-2 wrote: Hi, Can you tell us exactly which files you are using when you invoke fop, please. Your command should look something like fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf judging by the files you have attached. I am guessing you missed out the -xml/-xsl flags, leading FOP to believe you were supplying an FO file. When an XML and XSL files are supplied, FOP will perform an XSLT transform using the Xalan XSLT Xalan library (I am guessing you will need to know more about this stage in your project), generating the FO document stream that is then processed to generate the output in the desired format: XML + XSL - [XSLT transformer] - FO - [XSL:FO processor] - PDF This initial stage just saves on from having to do the transform first. I hope this info helps, Peter On Wed, Mar 9, 2011 at 12:43 PM, italocardwell italo.cardw...@gmail.com wrote: Ill be upfront I know nothing about XML. I am a SQL developer and I have a project where I need to convert XML files to a PDF. The XML are going to be the same format every time with different data in them. I am wanting to use apache fop 1.0 at the command line to convert these. I am getting an error every time that I attempt to do this. I will attach the files and the error. Would someone please help me out. Thanks. http://old.nabble.com/file/p31105999/a91ec9d3-e021-4e5e-933f-54992cd c 415c.20110308172937.xml a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml http://old.nabble.com/file/p31105999/ccr.xsl ccr.xsl http://old.nabble.com/file/p31105999/date.format-date.template.xsl date.format-date.template.xsl http://old.nabble.com/file/p31105999/str.padding.template.xsl str.padding.template.xsl The error that I get states that fo needs to be in xml-fo format. -- View this message in context: http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to - PDF-tp31105999p31105999.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-P DF-tp31105999p31106656.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- View this message in context: http://old.nabble.com/Apache-FOP
Re: Apache FOP Newbie needs Help Converting XML to PDF
Your ccr.xsl is not producing fo, but html. Maybe that's the problem. Oscar
Re: Apache FOP Newbie needs Help Converting XML to PDF
Thanks everyone for helping me out. I do appologize for being a moron with this stuff. Is there any way to convert my xsl file to a xslfo file so that it can be used? Or will it have to be completely re-created? Oscar Schoof wrote: Your ccr.xsl is not producing fo, but html. Maybe that's the problem. Oscar -- View this message in context: http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31108052.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Apache FOP Newbie needs Help Converting XML to PDF
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/09/2011 11:41 AM, italocardwell wrote: Thanks everyone for helping me out. I do appologize for being a moron with this stuff. Is there any way to convert my xsl file to a xslfo file so that it can be used? Or will it have to be completely re-created? XSLT is a transformation language that turns one kind of XML into another. XHTML is one kind of XML; XSL-FO is a completely different kind of XML. Since you said you were a SQL guy, think of XSLT as like a report generator. If you have a report that lists employees by ID with their SSNs and salaries, and you instead need a report that lists employees by department and last name with salaries and managers, you’re going to need to write a new report. ~Chris - -- Chris Maden, text nerd URL: http://crism.maden.org/ “Those in power write the history, while those who suffer write the songs.” — Frank Harte GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk13rv8ACgkQGfhmdwB3wxlAHgCfRVuyfZqQkMfZu0m5O8vnCpOQ RDwAnj7G88fTYFst9A2mkmyHcjUOLG38 =M6qQ -END PGP SIGNATURE- - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Apache FOP Newbie needs Help Converting XML to PDF
For what it's worth: there exists html to fo convertors. For example: http://html2fo.sourceforge.net/ Oscar Op 9-3-2011 17:46, Christopher R. Maden schreef: XSLT is a transformation language that turns one kind of XML into another. XHTML is one kind of XML; XSL-FO is a completely different kind of XML.