def make_ext(elem): elem.set('name') elem.set('namespace') elem.set('alias') elem.set('updated') desc = xmlutil.SubTemplateElement(elem, 'description') desc.text = 'description' xmlutil.make_links(elem, 'links')
def make_version(elem): elem.set("id") elem.set("status") elem.set("updated") mts = MediaTypesTemplateElement("media-types") elem.append(mts) mt = xmlutil.SubTemplateElement(mts, "media-type", selector="media-types") mt.set("base") mt.set("type") xmlutil.make_links(elem, "links")
def make_version(elem): elem.set('id') elem.set('status') elem.set('updated') mts = MediaTypesTemplateElement('media-types') elem.append(mts) mt = xmlutil.SubTemplateElement(mts, 'media-type', selector='media-types') mt.set('base') mt.set('type') xmlutil.make_links(elem, 'links')