def __init__(self, id, filepath, fullname, properties): """ Initialise a new instance of XMLTemplate. """ FSObject.__init__(self, id, filepath, fullname, properties) self.ZBindings_edit(self._default_bindings) self.__name__ = id self.title = id self.id = id self._setPropValue('content_type', 'text/xml') self.setup_transformProperties() self.setup_schemaProperties() try: fp = expandpath(self._filepath+'.propsheet') prop_map = parsePropertiesFile(fp, 1) for propdict in prop_map: setattr(self, propdict['id'], propdict['default_value']) self._properties = prop_map except: raise ZopePageTemplate.__init__(self, id)
def __init__(self, id, title, xml_file_id='content.xml', *args, **kw): ZopePageTemplate.__init__(self, id, title, *args, **kw) # we store the attachments of the uploaded document self.OLE_documents_zipstring = None self.ooo_xml_file_id = xml_file_id
def __init__(self, id, title, xml_file_id='content.xml', *args,**kw): ZopePageTemplate.__init__(self, id, title, *args, **kw) # we store the attachments of the uploaded document self.OLE_documents_zipstring = None self.ooo_xml_file_id = xml_file_id