'Returns a dict with the CSS class attribute to set on the annotation
and an XML key to delete from the element.'

def _get_annotation_class_attr(self, index, el):

    attr = {}
    cls = ['annotatable-span', 'highlight']
    highlight_key = 'highlight'
    color = el.get(highlight_key)
    if (color is not None):
        if (color in self.highlight_colors):
            cls.append(('highlight-' + color))
        attr['_delete'] = highlight_key
    attr['value'] = '    '.join(cls)
    return {'class': attr}
