Operations applied in order: setText, upsert, setAttribute, removeAttribute, addElement, remove. Each one sees the result of the previous ones.