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. Special tags for including content: - Allow you to include another document in the current template (as an OLE attachment) You must specify at least the path (can be either a single name or a path name using "/"). The type of document must be specified in the embedded document itself as a MIME type. Size parameters are defined, as in any ODF file, within the tag which encloses the tag. TODO: make sure it is useful or useless to pass x, y params (as before) Example: - Not unlike , allows you to include a picture document, refer to the part for details. The optional "type" attribute specifies the picture format ; you can either pass a full value ("image/jpeg") or the short version ("jpeg"). You can also pass position parameters with "x" and "y" attributes. The maxwidth and maxheight parameters are useful to set constraints. The aspect ratio information try to be kept (if you set only one size or if a constraint is applied). Example: 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: Known Issues: - content type must be set to text/html - remove any dtd declaration such as: