OOo Template

  An Zope object class to generate OOo documents dynamically.

  OOo Template derives from Zope Page Templates. Simply define the content.xml
  part of an OOo document in the edit tab. Then create a new File and upload
  an existing OOo document (ex. default_ooo_template). Then set the stylesheet
  property to the id of the uploaded OOo document (ex. default_ooo_template in this case).

  Rendering consists in replacing content.xml of the original OOo document
  with the content.xml generated by the OOo Template.

  Tips:

    - it is possible to embed images by calling oo_builder.addImage(image)
      where oo_builder is a handle to OOo Template internals and
      addImage a method to embed an image in the resulting document.

      Example:

      <draw:image draw:style-name="fr1" draw:name="Image1" text:anchor-type="as-char"
              draw:z-index="0" xlink:href="#Pictures/0001.png"
              xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"
              tal:attributes="xlink:href python:request.oo_builder.addImage(image.index_html(None,None,display='medium'))"/>

  Known Issues:

    - content type must be set to text/html

    - remove any dtd declaration such as:

    <!DOCTYPE office:document-content PUBLIC "-//OpenOffice.org//DTD OfficeDocument
1.0//EN" "office.dtd">
