split_text_node and find_ancestor_or_self