def split_namespace()

in vs-metadata/validate.py [0:0]


def split_namespace(string):
    """
    splits out the namespace and node name parts of an xml tag, if present
    :param string: the tag name to extract
    :return: a 2-tuple, first element being the tag and second being the namespace if present or None.
    """

    matches = node_splitter.search(string)
    if matches:
        return matches.group(2), matches.group(1)
    else:
        return string, None