XSL-FO Docbook Transformation failing

In an attempt to render PDF via FO, I am reading the Oxygen Users Manual (pages 314-333) and am trying the Docbook PDF transformation described on pages 326-327. However, this transformation fails with an Error Msg 1 which appears to be a FOP command line usage error. Since I cannot see the actual call to FOP from Ozygen, I have no idea how to fix this. I should also add that my FO and XSLT files run when I invoke FOP from the command line. Mark

Hello, The predefined transformations should generate the output without such errors. You can see the FOP command line and the FOP output in a text console at the bottom of the Oxygen window if you activate it with the option "Enable the output of the built-in FOP" available in Preferences -> XML -> XSLT/FO/XQuery -> FO Processors. Please post here the FOP output. What is your Oxygen version? Regards, Sorin Mark Wilson wrote:
In an attempt to render PDF via FO, I am reading the Oxygen Users Manual (pages 314-333) and am trying the Docbook PDF transformation described on pages 326-327. However, this transformation fails with an Error Msg 1 which appears to be a FOP command line usage error. Since I cannot see the actual call to FOP from Ozygen, I have no idea how to fix this.
I should also add that my FO and XSLT files run when I invoke FOP from the command line.
Mark

Hello, My Version is: 9.3, build 2008070211. I had not seen the FOP tab at the bottom of the page. So I ran my own transformation again, and tab told me that the file fopConfiguration.xml had mixed content in a tag. The fopConfiguration file was created when I tried to add a font following the instructions in your document "addFontToFOP.pdf". I deleted fopConfiguration file and removed it from the fo processors configuration. Then, to test FOP, I once again followed the instructions for the Docbook transformation. This time it ran (which means FOP is OK in my copy of Oxygen). However, because my xml is not in Docbook form, it simply (and rightly) refused to produce an output with the message: [Saxon-B] Note: namesp. add : added namespace before processing [Saxon-B] ERROR: Document root element for FO output must be one of the following elements: appendix article bibliography book chapter colophon dedication glossary index part preface qandaset refentry reference sect1 section set setindex. Now that I know FOP is "working" (and could not produce a Docbook from a non-dockbook xml file), I would like to know what is wrong with my own transformation scenario. So, I ran my own transformation scenerio again. A pdf file was created, but trying to open it failed with the message: "Acrobat could not open the file ... because it is either an unsupported file type or was damaged." However, when I run FOP from the command line: c:\Users\HP\fop-0.95-bin\fop-0.95\fop -xml krusty.xml -xsl krusty.xsl -pdf work\krusty.pdf produces a valid pdf document How can I find out what in my transformation scenario is causing it to produce a corrupt pdf file? Thanks, Mark -------------------------------------------------- From: "Sorin Ristache" <sorin@oxygenxml.com> Sent: Tuesday, August 26, 2008 7:09 AM To: <oxygen-user@oxygenxml.com> Subject: Re: [oXygen-user] XSL-FO Docbook Transformation failing
Hello,
The predefined transformations should generate the output without such errors. You can see the FOP command line and the FOP output in a text console at the bottom of the Oxygen window if you activate it with the option "Enable the output of the built-in FOP" available in Preferences -> XML -> XSLT/FO/XQuery -> FO Processors. Please post here the FOP output.
What is your Oxygen version?
Regards, Sorin
Mark Wilson wrote:
In an attempt to render PDF via FO, I am reading the Oxygen Users Manual (pages 314-333) and am trying the Docbook PDF transformation described on pages 326-327. However, this transformation fails with an Error Msg 1 which appears to be a FOP command line usage error. Since I cannot see the actual call to FOP from Ozygen, I have no idea how to fix this. I should also add that my FO and XSLT files run when I invoke FOP from the command line. Mark
oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

I am very sorry. I looked at my transformation scenario once more and discovered that the output had been accidently changed to txt. It is now working. Thank you for your help, Mark -------------------------------------------------- From: "Sorin Ristache" <sorin@oxygenxml.com> Sent: Tuesday, August 26, 2008 7:09 AM To: <oxygen-user@oxygenxml.com> Subject: Re: [oXygen-user] XSL-FO Docbook Transformation failing
Hello,
The predefined transformations should generate the output without such errors. You can see the FOP command line and the FOP output in a text console at the bottom of the Oxygen window if you activate it with the option "Enable the output of the built-in FOP" available in Preferences -> XML -> XSLT/FO/XQuery -> FO Processors. Please post here the FOP output.
What is your Oxygen version?
Regards, Sorin
Mark Wilson wrote:
In an attempt to render PDF via FO, I am reading the Oxygen Users Manual (pages 314-333) and am trying the Docbook PDF transformation described on pages 326-327. However, this transformation fails with an Error Msg 1 which appears to be a FOP command line usage error. Since I cannot see the actual call to FOP from Ozygen, I have no idea how to fix this. I should also add that my FO and XSLT files run when I invoke FOP from the command line. Mark
oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

I am using: XML Editor 9.3, build 2008070211 I need to render Czech language glyphs. Since 'C' appeared as '#' in my PDF output, I assumed I needed to embed a font. I tried to embed Tlcenteu.ttf (Times Central Europe), following the directions in your "How to Add a Font to the Oxygen built-in FOP". It failed with an 'unexpected end of file' error. So I went to http://www.sweb.cz/ls78/ttfonts.htm and downloaded Casy EA and Casy EA Bold. This time what appear to be two good metrics files, casy.xml and casy_0.xml, were built. I added the fopConfiguration.xml file as instructed in your document, changed my font name in the XSL file from "sans serif" to "casy", and re-ran my transformation scenario. Although a good PDF file was produced, it appeared to be identical to the previous file and again did not render the Czech alphabet characters. Have I missed a step? Thanks for any help, Mark

Hello, The instructions from the article "How to Add a Font to the Oxygen built-in FOP" are specific for DocBook and TEI transformations and are intended to give two examples of how you can configure and embed a custom font in PDF output generated with the Apache FOP processor. Do you try to transform a DocBook XML document or a TEI XML one to PDF? If yes it seems something was wrong in applying the procedure described in the article. Please make a zip with a sample source XML file, the TrueType (.ttf) font files from which you generated the font metrics files, the font metrics files and the FOP configuration file. We will try to generate a PDF result with correct Czech glyphs and tell you what you did wrong. If not you have to make sure that your custom XSLT stylesheet generates an intermediate XSL-FO file with correct references to the fonts specified in the FOP configuration file. The FOP processor has to match these references with the font metrics files specified in the FOP configuration file. Regards, Sorin Mark Wilson wrote:
I am using: XML Editor 9.3, build 2008070211
I need to render Czech language glyphs. Since 'C' appeared as '#' in my PDF output, I assumed I needed to embed a font. I tried to embed Tlcenteu.ttf (Times Central Europe), following the directions in your "How to Add a Font to the Oxygen built-in FOP". It failed with an 'unexpected end of file' error.
So I went to http://www.sweb.cz/ls78/ttfonts.htm and downloaded Casy EA and Casy EA Bold. This time what appear to be two good metrics files, casy.xml and casy_0.xml, were built.
I added the fopConfiguration.xml file as instructed in your document, changed my font name in the XSL file from "sans serif" to "casy", and re-ran my transformation scenario. Although a good PDF file was produced, it appeared to be identical to the previous file and again did not render the Czech alphabet characters.
Have I missed a step? Thanks for any help, Mark

Thanks for your kind offer, but when you get to my later emails, you will see that eventually I was successful. Regards, Mark -------------------------------------------------- From: "Sorin Ristache" <sorin@oxygenxml.com> Sent: Thursday, August 28, 2008 2:44 AM To: <oxygen-user@oxygenxml.com> Subject: Re: [oXygen-user] Embedding a font in FOP for Oxygen
Hello,
The instructions from the article "How to Add a Font to the Oxygen built-in FOP" are specific for DocBook and TEI transformations and are intended to give two examples of how you can configure and embed a custom font in PDF output generated with the Apache FOP processor. Do you try to transform a DocBook XML document or a TEI XML one to PDF?
If yes it seems something was wrong in applying the procedure described in the article. Please make a zip with a sample source XML file, the TrueType (.ttf) font files from which you generated the font metrics files, the font metrics files and the FOP configuration file. We will try to generate a PDF result with correct Czech glyphs and tell you what you did wrong.
If not you have to make sure that your custom XSLT stylesheet generates an intermediate XSL-FO file with correct references to the fonts specified in the FOP configuration file. The FOP processor has to match these references with the font metrics files specified in the FOP configuration file.
Regards, Sorin
Mark Wilson wrote:
I am using: XML Editor 9.3, build 2008070211
I need to render Czech language glyphs. Since 'C' appeared as '#' in my PDF output, I assumed I needed to embed a font. I tried to embed Tlcenteu.ttf (Times Central Europe), following the directions in your "How to Add a Font to the Oxygen built-in FOP". It failed with an 'unexpected end of file' error.
So I went to http://www.sweb.cz/ls78/ttfonts.htm and downloaded Casy EA and Casy EA Bold. This time what appear to be two good metrics files, casy.xml and casy_0.xml, were built.
I added the fopConfiguration.xml file as instructed in your document, changed my font name in the XSL file from "sans serif" to "casy", and re-ran my transformation scenario. Although a good PDF file was produced, it appeared to be identical to the previous file and again did not render the Czech alphabet characters.
Have I missed a step? Thanks for any help, Mark
oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Having Oxygen "know" the XSLT elements and attributes is great. Is it possible to attach the Apache unofficial XSL sxhema [http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop.xsd?view...] to Oxygen so that users of XSL-FO have the same benefits as XSLT users? Or is there other means for achieving that? Thanks, Mark

Ammendment: In looking at the metrics files, I realized the font names were different from the ones I put in the XSL file, so I changed them. Now, instead of C or #, I get a square, empty box. Hope this added info helps. Mark -------------------------------------------------- From: "Sorin Ristache" <sorin@oxygenxml.com> Sent: Tuesday, August 26, 2008 7:09 AM To: <oxygen-user@oxygenxml.com> Subject: Re: [oXygen-user] XSL-FO Docbook Transformation failing
Hello,
The predefined transformations should generate the output without such errors. You can see the FOP command line and the FOP output in a text console at the bottom of the Oxygen window if you activate it with the option "Enable the output of the built-in FOP" available in Preferences -> XML -> XSLT/FO/XQuery -> FO Processors. Please post here the FOP output.
What is your Oxygen version?
Regards, Sorin
Mark Wilson wrote:
In an attempt to render PDF via FO, I am reading the Oxygen Users Manual (pages 314-333) and am trying the Docbook PDF transformation described on pages 326-327. However, this transformation fails with an Error Msg 1 which appears to be a FOP command line usage error. Since I cannot see the actual call to FOP from Ozygen, I have no idea how to fix this. I should also add that my FO and XSLT files run when I invoke FOP from the command line. Mark
oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
participants (2)
-
Mark Wilson
-
Sorin Ristache