reimplement attribute parsing to preserve simple types