Esempio n. 1
0
 def construct(self):
     sel = xmlutil.Selector('meta', xmlutil.get_items, 0)
     root = xmlutil.TemplateElement('meta', selector=sel)
     root.set('key', 0)
     root.text = 1
     return xmlutil.MasterTemplate(root, 1, nsmap=metadata_nsmap)
Esempio n. 2
0
 def construct(self):
     root = xmlutil.TemplateElement('choices')
     elem = xmlutil.SubTemplateElement(root, 'version', selector='choices')
     make_version(elem)
     return xmlutil.MasterTemplate(root, 1, nsmap=version_nsmap)
Esempio n. 3
0
 def construct(self):
     root = xmlutil.TemplateElement('extensions')
     elem = xmlutil.SubTemplateElement(root, 'extension',
                                       selector='extensions')
     make_ext(elem)
     return xmlutil.MasterTemplate(root, 1, nsmap=ext_nsmap)
Esempio n. 4
0
 def construct(self):
     root = xmlutil.TemplateElement('version', selector='version')
     make_version(root)
     return xmlutil.MasterTemplate(root, 1, nsmap=version_nsmap)