empty strings should be matched as text-only nodes