Improve NS handling in XML rendering