Added dynamic attribute parsing

Uses a map of location-attribute pairs to make a map of attribute-value
pairs.