Cocoon problems generating html output
Hi all, I'm a bit of a Cocoon newbie so forgive me if there are any errors in the following... In an attempt to push the use of DocBook for technical documentation within our group I have been trialling its use and using Cocoon 2.0.4 as the publishing framework. I have deployed this under tomcat-4.1.24 on Solaris 8 with j2sdk1.4.1_01. We are also using docbook-xsl-1.58.1 for the stylesheets. We are mainly generating this into html and pdf for review and distribution. Now I have replaced Xalan with Saxon the html seems be working a lot better, faster and more reliable. One problem I am having is with graphics in PDF files, if I include an imageobject element in the docbook all works fine for html but with pdf the image fails to be included. The following error occurs in both the error.log and the sitemap.log ERROR (2003-06-04) 08:51.35:216 [sitemap.serializer.fo2pdf.fop] (/cocoon/mount/users/r_exley/doc/r_exley/rpe006.pdf) Thread-8/ExternalGraphic: Error while creating area : Error with image URL: images/rpe006_1.png (No such file or directory) and no base directory is specified A fragment from the docbook source used in this is as follows: mediaobject imageobject imagedata fileref=images/rpe006_1.png format=PNG/ /imageobject /mediaobject After searching through google etc. this seems to be because the somewhere between Apache FOP and docbook-xsl a baseDir configuration parameter is required when operating in a servlet environment. The following is one of the references I found to this. http://forrestbot.cocoondev.org/sites/xml-fop/embedding.html#config-internal How do I approach getting this into my cocoon implementation ? Has anyone had any experience of this ? Is it docbook-xsl, FOP or Cocoon that is deficient in the treatment of images and PDFs via this mechanism ? Am I missing something or doing this incorrectly ? FYI - I am pretty sure using this approach plus FOP all works from the command line. I would appreciate any help/advice on this. Equally if I should be addressing this elsewhere then thats fine as well. thanks in advance --- Rob Exley Senior Technical Consultant Equifax Plc e-mail: [EMAIL PROTECTED] tel: 01274 759610 This message contains information from Equifax, Inc. which may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify by e:mail [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon problems generating html output
Hello Rob, to make it short: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15316 Are absolute paths an option for you? Passing a base directory to FOP is not implemented in Cocoon'S FOPSerailizer. Joerg [EMAIL PROTECTED] wrote: Hi all, I'm a bit of a Cocoon newbie so forgive me if there are any errors in the following... In an attempt to push the use of DocBook for technical documentation within our group I have been trialling its use and using Cocoon 2.0.4 as the publishing framework. I have deployed this under tomcat-4.1.24 on Solaris 8 with j2sdk1.4.1_01. We are also using docbook-xsl-1.58.1 for the stylesheets. We are mainly generating this into html and pdf for review and distribution. Now I have replaced Xalan with Saxon the html seems be working a lot better, faster and more reliable. One problem I am having is with graphics in PDF files, if I include an imageobject element in the docbook all works fine for html but with pdf the image fails to be included. The following error occurs in both the error.log and the sitemap.log ERROR (2003-06-04) 08:51.35:216 [sitemap.serializer.fo2pdf.fop] (/cocoon/mount/users/r_exley/doc/r_exley/rpe006.pdf) Thread-8/ExternalGraphic: Error while creating area : Error with image URL: images/rpe006_1.png (No such file or directory) and no base directory is specified A fragment from the docbook source used in this is as follows: mediaobject imageobject imagedata fileref=images/rpe006_1.png format=PNG/ /imageobject /mediaobject After searching through google etc. this seems to be because the somewhere between Apache FOP and docbook-xsl a baseDir configuration parameter is required when operating in a servlet environment. The following is one of the references I found to this. http://forrestbot.cocoondev.org/sites/xml-fop/embedding.html#config-internal How do I approach getting this into my cocoon implementation ? Has anyone had any experience of this ? Is it docbook-xsl, FOP or Cocoon that is deficient in the treatment of images and PDFs via this mechanism ? Am I missing something or doing this incorrectly ? FYI - I am pretty sure using this approach plus FOP all works from the command line. I would appreciate any help/advice on this. Equally if I should be addressing this elsewhere then thats fine as well. thanks in advance --- Rob Exley Senior Technical Consultant Equifax Plc e-mail: [EMAIL PROTECTED] tel: 01274 759610 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon problems generating html output
Thanks Joerg, Unfortunately we are directly publishing the source XML from CVS, therefore we can guarantee that the images are in the same place relative to the source document but we cannot guarantee the absolute path. Are there any workarounds until this is fixed that you know of..? --- Rob. On Wed, 2003-06-04 at 09:37, Joerg Heinicke wrote: Hello Rob, to make it short: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15316 Are absolute paths an option for you? Passing a base directory to FOP is not implemented in Cocoon'S FOPSerailizer. Joerg [EMAIL PROTECTED] wrote: Hi all, I'm a bit of a Cocoon newbie so forgive me if there are any errors in the following... In an attempt to push the use of DocBook for technical documentation within our group I have been trialling its use and using Cocoon 2.0.4 as the publishing framework. I have deployed this under tomcat-4.1.24 on Solaris 8 with j2sdk1.4.1_01. We are also using docbook-xsl-1.58.1 for the stylesheets. We are mainly generating this into html and pdf for review and distribution. Now I have replaced Xalan with Saxon the html seems be working a lot better, faster and more reliable. One problem I am having is with graphics in PDF files, if I include an imageobject element in the docbook all works fine for html but with pdf the image fails to be included. The following error occurs in both the error.log and the sitemap.log ERROR (2003-06-04) 08:51.35:216 [sitemap.serializer.fo2pdf.fop] (/cocoon/mount/users/r_exley/doc/r_exley/rpe006.pdf) Thread-8/ExternalGraphic: Error while creating area : Error with image URL: images/rpe006_1.png (No such file or directory) and no base directory is specified A fragment from the docbook source used in this is as follows: mediaobject imageobject imagedata fileref=images/rpe006_1.png format=PNG/ /imageobject /mediaobject After searching through google etc. this seems to be because the somewhere between Apache FOP and docbook-xsl a baseDir configuration parameter is required when operating in a servlet environment. The following is one of the references I found to this. http://forrestbot.cocoondev.org/sites/xml-fop/embedding.html#config-internal How do I approach getting this into my cocoon implementation ? Has anyone had any experience of this ? Is it docbook-xsl, FOP or Cocoon that is deficient in the treatment of images and PDFs via this mechanism ? Am I missing something or doing this incorrectly ? FYI - I am pretty sure using this approach plus FOP all works from the command line. I would appreciate any help/advice on this. Equally if I should be addressing this elsewhere then thats fine as well. thanks in advance --- Rob Exley Senior Technical Consultant Equifax Plc e-mail: [EMAIL PROTECTED] tel: 01274 759610 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Rob Exley Senior Technical Consultant Equifax Plc e-mail: [EMAIL PROTECTED] tel: 01274 759610 signature.asc Description: This is a digitally signed message part
Re: Cocoon problems generating html output
On Wed, Jun 04, 2003 at 10:37:47AM +0200, Joerg Heinicke wrote: Hello Rob, to make it short: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15316 Are absolute paths an option for you? Btw, the 'realpath' input module is useful here, for passing in the absolute context path into the xsl:fo stylesheet: map:transform src=stylesheets/document2fo.xsl map:parameter name=ctxbasedir value={realpath:.}// /map:transform Then you can concat($ctxbasedir, 'resources/images/', @src) to generate a FOP-friendly image path. There's an example of this in Forrest. --Jeff Joerg [EMAIL PROTECTED] wrote: Hi all, I'm a bit of a Cocoon newbie so forgive me if there are any errors in the following... In an attempt to push the use of DocBook for technical documentation within our group I have been trialling its use and using Cocoon 2.0.4 as the publishing framework. I have deployed this under tomcat-4.1.24 on Solaris 8 with j2sdk1.4.1_01. We are also using docbook-xsl-1.58.1 for the stylesheets. We are mainly generating this into html and pdf for review and distribution. Now I have replaced Xalan with Saxon the html seems be working a lot better, faster and more reliable. One problem I am having is with graphics in PDF files, if I include an imageobject element in the docbook all works fine for html but with pdf the image fails to be included. The following error occurs in both the error.log and the sitemap.log ERROR (2003-06-04) 08:51.35:216 [sitemap.serializer.fo2pdf.fop] (/cocoon/mount/users/r_exley/doc/r_exley/rpe006.pdf) Thread-8/ExternalGraphic: Error while creating area : Error with image URL: images/rpe006_1.png (No such file or directory) and no base directory is specified A fragment from the docbook source used in this is as follows: mediaobject imageobject imagedata fileref=images/rpe006_1.png format=PNG/ /imageobject /mediaobject After searching through google etc. this seems to be because the somewhere between Apache FOP and docbook-xsl a baseDir configuration parameter is required when operating in a servlet environment. The following is one of the references I found to this. http://forrestbot.cocoondev.org/sites/xml-fop/embedding.html#config-internal How do I approach getting this into my cocoon implementation ? Has anyone had any experience of this ? Is it docbook-xsl, FOP or Cocoon that is deficient in the treatment of images and PDFs via this mechanism ? Am I missing something or doing this incorrectly ? FYI - I am pretty sure using this approach plus FOP all works from the command line. I would appreciate any help/advice on this. Equally if I should be addressing this elsewhere then thats fine as well. thanks in advance --- Rob Exley Senior Technical Consultant Equifax Plc e-mail: [EMAIL PROTECTED] tel: 01274 759610 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]