Collect attributes & support inheritance.