Created attachment 28913 [details] PATCH for ODT render Hi, I integrated the new render into my local checkout of FOP's trunk. From the list gave by Glenn: (+) I provided some tests that basic implemented functionalties. (+/-) org.apache.fop.cli.CommandLineOptions were extended to execute odt rendering incuding info. I didn't need to change fop.sh to make it run. I don't know if there is something to do (as well in js) To try, please do: fop foo.fo -odt foo.odt (+) I added the documentation in: * src/documentation/content/xdocs/trunk/output.xml * src/documentation/content/xdocs/trunk/running.xml (+) run 'ant checkstyle', and fix all warnings found in build/report_checkstyle.htm (+/-) run 'ant findbugs', and fix all warnings found in build/report_findbugs.html (due to odt render) Still left one: rg.apache.fop.render.odf.ODTFOEventHandlerMaker.getSupportedMimeTypes() may expose internal representation by returning ODTFOEventHandlerMaker.MIMES but I don't undestand its porpuse. (+) run 'ant javadocs', and fix any warnings that I have introduced (+) I have sent the ICLA to secretary@apache.org (+) I created the patch. Regards, Marek
(In reply to comment #0) > Created attachment 28913 [details] > PATCH for ODT render I'm not sure which tool you used to create the patch file, but I am having difficulty applying it due to the presence of binary data (*.odt files) in the diff. Could you separate out any binary files to be added into a separate TGZ file separately attached? Also, I see that you patch adds a number of ODF libraries to the runtime libs required to run FOP. Although these are coming from an ASF incubator project [1], a vote will have to be taken on creating this new dependency in FOP. You should also supply the required versions of the JAR files containing these new libraries in the TGZ attachment described above. [1] http://incubator.apache.org/projects/odftoolkit.html
Created attachment 28941 [details] PATCH for ODT render
I used eclipse envirement with its plugins.The odt files aren't realy necesairy as they are only the outputs of test fo-files. I am putting now diff files without odt-files included made with command line svn. For odt generation I have used : + odfdom-java-0.8.7.jar + simply-odf-0.6.6.jar Odfdom, it was what I have found the simplest and that is licence compatible to fop. Odfdom is really low level api but it was advantage for me that odt render is a transformation of one xml (fo) to another (.odt). For the simple-odf I am not glad. I started to develop from this, as I was beginner in fop and odt. However, during development I was constantly removing dependencies of its api as I found that odfdom is sufficient. Simply-odf is still used for Paragraph abstraction but I hope to refactor this to have everything on xml tags abstraction. So simply-odf is for me a temporary dependence. To this comment I attache : + odt_render_without_bin.path : contains only *.java, *.fo + img.jpg : file to test should be in ./fop/test/odf/odt/fo_external_grphic/img.jpg (but it is find by google, so I don't know about the rights to use it, this file can be change by any) + odt_outputs.tgz : contains *.odt (names are appropriate to *.fo input files) + odt_libraries.tgz : contains odfdom-java-0.8.7.jar, simply-odf-0.6.6.jar Marek(In reply to comment #1) > (In reply to comment #0) > > Created attachment 28913 [details] > > PATCH for ODT render > > I'm not sure which tool you used to create the patch file, but I am having > difficulty applying it due to the presence of binary data (*.odt files) in > the diff. Could you separate out any binary files to be added into a > separate TGZ file separately attached? > > Also, I see that you patch adds a number of ODF libraries to the runtime > libs required to run FOP. Although these are coming from an ASF incubator > project [1], a vote will have to be taken on creating this new dependency in > FOP. You should also supply the required versions of the JAR files > containing these new libraries in the TGZ attachment described above. > > [1] http://incubator.apache.org/projects/odftoolkit.html
Created attachment 28942 [details] Image for tests
Created attachment 28943 [details] Output of the tests - *.odt
ODT liraries please find here: https://docs.google.com/open?id=0Bxy7yhoOWhbidXdPeGRiMGxaUUk
(In reply to comment #3) > For the simple-odf I am not glad. I started to develop from this, as I was > beginner in fop and odt. However, during development I was constantly > removing dependencies of its api as I found that odfdom is sufficient. > Simply-odf is still used for Paragraph abstraction but I hope to refactor > this to have everything on xml tags abstraction. So simply-odf is for me a > temporary dependence. I will wait until you finish eliminating the simple-odf dependency before further considering this patch. Please submit a new patch when you have done that.
Created attachment 28972 [details] PATCH for ODT render I removed all references to simply-odf.
I removed all references to simply-odf.
Created attachment 29044 [details] PATCH for ODT render Some corrections and synchronization with trunk.
Created attachment 29279 [details] Documentation : Implementation State of patch According to spec http://www.w3.org/TR/xsl11/ I summarize the implementation state of attached patch. Gray : attribute not aplicable; Gray Light : conffusion in spec, probably applicable X : attribute applicable; Green : functionality implemented;
Hi, After looking into spec, I realized that I have implemented Font Properties for fo:basic-link (by the fop api) that isn't the part of specification. Why we can retrvie these informations from object model? Marek
Created attachment 29338 [details] PATCH for ODT render Huge refactoring of "Styles". The reference implementation is BlockTag with "fonts" properties. The other code should follow this pattern.
Created attachment 29346 [details] Documentation : Class Diagramm
Created attachment 29347 [details] PATCH for ODT render A little bit of comments and cleaning as well as implementation of text-decoration, baseline-shift.
Created attachment 29348 [details] Documentation : Implementation State of patch
Good source of samples : http://www.xmlmind.com/foconverter/samples.html Marek
(In reply to comment #17) > Good source of samples : > > http://www.xmlmind.com/foconverter/samples.html While it is useful to include documentation in a bug report, it doesn't help the community so much. I would suggest you create a wiki page at [1]. [1] http://wiki.apache.org/xmlgraphics-fop/DeveloperPages Eventually, if ODT is to be supported, you will also need to add documentation in [2] and possibly create a new file at [3]. [2] src/documentation/content/xdocs/trunk/output.xml [3] src/documentation/content/xdocs/trunk/odt.xml
The wiki page available at: http://wiki.apache.org/xmlgraphics-fop/ODT_render
Created attachment 29413 [details] Documentation : Class Diagram
Created attachment 29448 [details] PATCH for ODT render Small refactoring. BackgroundColor property shows how to create different implementations of property for different tags.
Created attachment 29451 [details] PATCH for ODT render Bord and padding
Created attachment 29452 [details] PATCH for ODT render Refactoring, TagFactory Enhancement, PageSequence correction (Exception).