added check for legal xml attribute names