def strip_namespace(tag_name):
    """
    Strip all namespaces or namespace prefixes if present in an XML tag name .

    For example:
    >>> tag_name = '{http://maven.apache.org/POM/4.0.0}geronimo.osgi.export.pkg'
    >>> expected = 'geronimo.osgi.export.pkg'
    >>> assert expected == strip_namespace(tag_name)
    """
    head, brace, tail = tag_name.rpartition('}')
    return tail if brace else head