adapt schema parser to the new XmlObject api
fix variable creep from upper scope