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 "/") and the type of the document (generally calc or writer), the default is zope's content-type. The size is always specified in centimeters (with attached "cm" suffix or not). You can specify the style (defined in the sylesheet) with the "style" option. You can also pass "x" and "y" attributes for positioning, it's mainly useful for draw documents. 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: