def get_href_attribute(xml_elem):
    """ Helping function which returns None or the href attribute.

    Since some xml documents use https for the w3.org reference,
    it is nicer to encapsulate the logic inside this separate function.

    Args:
        xml_elem: The xml element
    Returns:
         None | the attribute
    """
    xlink = None
    if xml_elem is not None:
        possible_tags = [
            "{http://www.w3.org/1999/xlink}href",
            "{https://www.w3.org/1999/xlink}href",
        ]
        for tag in possible_tags:
            xlink = xml_elem.get(tag)
            if xlink is not None:
                break
    return xlink