You are not logged in Log in Join
You are here: Home » Members » philikon » Zope OpenOffice.org Document » README » View Document

Log in
Name

Password

 

README

ZooDocument - Zope OpenOffice.org Document

ZooDocument is a Zope product that integrates OpenOffice.org documents into ZPT based Zope sites. It is split into three parts:

  • ooo2html.xsl is a XML style sheet that, when run through a XSLT processor, translates OpenOffice.org XML documents to rather clean HTML. It has been tested with Xalan and xsltproc.
  • OpenOfficeDoc is a simple python class that gives access to the data in OpenOffice.org documents via a simple API. It can be used completely independently.
  • ZooDocument is the Zope class which lets the user upload an OpenOffice.org document. It then uses OpenOfficedoc and XMLTransform to convert the document to HTML. From that point on, ZooDocument functions as a standard Zope PageTemplate.

In order to completely integrate with already existing sites, ZooDocuments can call a patching script after converting to HTML. This gives site administrators the chance to add common METAL directives to all Page Templates, for example. The patching script has to be a callable object named "zooPatch". It must take one argument, the raw HTML code that the XSLT processor spits out as a string. It must return what is to used as PageTemplate content.

Why?

OpenOffice.org supports HTML export of all document types. So why this product?

Imagine a scenario where people not knowing anything about HTML are trying to publish their text documents. Most probably, they will use the HTML export feature of their favourite text processor which produces crappy HTML That both doesn't validate and is hard to change manually. Now these people put their crappy HTML into Page Templates. They throw errors because a

is missing. The people will end up with a lot of frustation and you will end up with a lot of phone calls...

Admittedly, a complicated text document converted by ZooDocument still looks like it's been created by a program. However, it is much easier to edit manually since everything is indented the way it should be. Secondly, it definitely validates, not only for ZPT but also for the W3C validator. As a bonus, it makes heavy use of style sheets, thus separating content and presentation even at that level.

Requirements

  • Zope 2.5.0 or higher (has been tested with 2.6.0). It might work with 2.4.X
  • The XMLTransform product by Ariel Partners LLC, downloadable at http://www.zope.org/Members/arielpartners/XMLTransform
  • At least one XSLT processor supported by XMLTransform. Please check the README.txt file in the XMLTransform package.

Known Bugs/Restrictions

  • Due to the limits of XSLT and HTML, not every feature of OpenOffice.org document editing can be translated, e.g. automatic fields, footnotes, columns, rotation, bookmarks, reference marks, line numbering, Ruby.
  • Tab stops and consecutive spaces are not translated properly.
  • Due to the way, OpenOffice.org starts processes, it is not possible to use ExternalEditor with ZooDocument instances.

Copying

The software described above is distributed under the terms of the Mozilla Public License (MPL) v1.1.

I encourage you to use this product or parts of it in your products according to the above mentioned license. Please let me know when you do.

Author

Philipp "philiKON" von Weitershausen ([email protected])