move start_element emission out into a new (inlined) function, so