my %change=( 'CommitteeList' => 'person', # CommitteeList tag should become person 'Ch_Chair' => 'person[officer]'); # Ch_Chair tag should become person too # but consecutive officers should then be # wrapped in an officer tag my %wrap= ( officers => 'person[officer]+', # this defines the wrapping perslist => 'officers?, person+'); # then we wrap the whole list in a perslist tag my @wrap=( 'officers', 'perslist'); # to process them in the proper order