return the namespace for a given tag, or '' if no namespace given

def tag_namespace(cls, tag):
        """return the namespace for a given tag, or '' if no namespace given"""
        md = re.match("^(?:\{([^\}]*)\})", tag)
        if md is not None:
            return md.group(1)