Return definition element with name *defname*

def getdef(self, defname, tag='*'):
        """Return definition element with name *defname*"""
        if defname.startswith('a:'):
            defname = defname[2:]
        for xsd in self.__xsd_trees:
            xpath = "./%s[@name='%s']" % (tag, defname)
            elements = xsd.xpath(xpath)
            if elements:
                return elements[0]
        raise KeyError("no definition named '%s' found" % defname)