'get_valid_attribute_values
get the current attribute, and return the values that are allowed in that
attribute'

def get_valid_attribute_values(self, attr, buf, pos):

    node = buf.xml_node_at_pos(pos)
    if (node is None):
        return None
    handlerclass = buf.xml_tree_handler(node)
    values = handlerclass.values(attr, buf.xml_tree, node)
    if (not values):
        return None
    values.sort()
    return values
