def tag_contents_xpath(tag, content):
    """Constructs an xpath matching element with tag containing content"""
    content = content.lower()
    return '//{}[contains(translate(*,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz"),"{}")]'.format(tag, content)