Refactor the use of ol.xml.getLocalName(n)