handling mixed-contents text nodes by converting them to empty elements