def __init__(self, dom, importer): CModuleMeta.__init__(self, dom) self._d_importer = importer # check grammar version: vers_attr = xml.xpath.Evaluate("string(/Assembly/@version)", self._d_dom) if not vers_attr == "1.0": raise InvalidGrammarVersion("Can't handle grammar version %s"%vers_attr)
def __init__(self, xml_dom, file_path): CModuleMeta.__init__(self, xml_dom) self._d_file_path = file_path # check grammar version: vers_attr = xml.xpath.Evaluate("/Module/@version", self._d_dom) if not vers_attr[0].nodeValue == "1.0": raise InvalidGrammarVersion("Can't handle grammar version %s"%vers_attr[0].nodeValue)
def __init__(self, xml_dom, file_path): """ This contructor will also call the constuctor of the L{ModuleMeta} class. @param xml_dom: The xml.dom.Document node containing the meta-data. @type xml_dom: xml.dom.Document @param file_path: The filepath of the module description. This path will be used to find the archive containing the module implentation. If the archive path specified in the module meta is not absolute the archive will be searched relative to the module meta file. @type file_path: string """ CModuleMeta.__init__(self, xml_dom) self._d_file_path = file_path # check grammar version: vers_attr = xml.xpath.Evaluate("/Module/@version", self._d_dom) if not vers_attr[0].nodeValue == "1.0": raise InvalidGrammarVersion("Can't handle grammar version %s" % vers_attr[0].nodeValue)