'Get paths for html and xml files.'

@classmethod
def backcompat_paths(cls, filepath):

    dog_stats_api.increment(DEPRECATION_VSCOMPAT_EVENT, tags=['location:html_descriptor_backcompat_paths'])
    if filepath.endswith('.html.xml'):
        filepath = (filepath[:(-9)] + '.html')
    if filepath.endswith('.html.html'):
        filepath = filepath[:(-5)]
    candidates = []
    while (os.sep in filepath):
        candidates.append(filepath)
        (_, _, filepath) = filepath.partition(os.sep)
    new_candidates = []
    for candidate in candidates:
        if candidate.endswith('.xml'):
            new_candidates.append((candidate[:(-4)] + '.html'))
    return (candidates + new_candidates)
