%xx;
%apply;capitalize(xx.occupation)
%if;(xx.has_birth_date or xx.has_birth_place)
%birth_symbol;%xx.slash_birth_date; %xx.birth_place;
%end;
%if;(xx.has_death_date or xx.has_death_place)
%death_symbol;%xx.slash_death_date; %xx.death_place;
%end;
%end;
%define;anc_tag()
%foreach;ancestor_level(l_v)
%if;(level > 1 and (evar.only != "on" or level = l_v))
%foreach;ancestor;
%if;(ancestor.same = "")
%apply;one_tag("ancestor")
%end;
%if;(evar.siblings = "on" and ancestor.index != self.index and ancestor.nb_children > 1)
%foreach;ancestor.family;
%if;(spouse.index != ancestor.spouse.index)
%apply;one_tag("spouse")
%if;(nb_children > 0)
%foreach;child;
%if;(child.sosa_in_list = "")
%apply;one_tag("child")
%end;
%end;
%end;
%end;
%if;(ancestor.anc_sosa.v % 2 = 0 and family.index = ancestor.family.index)
%foreach;child;
%if;(child.sosa_in_list = "")
%apply;one_tag("child")
%end;
%end;
%end;
%end;
%end;
%end;
%end;
%end;
%end;
%define;des_tag(curlev,maxlev)
%apply;one_tag("self")
%let;lev;%expr(l_v - curlev + 1)%in;
%foreach;family;
%if;(curlev < maxlev and family.desc_level = curlev and has_children)
%family.set_infinite_desc_level;
%if;(spouse.sosa_in_list = "")
%apply;one_tag("spouse")
%end;
%foreach;child;
%apply;des_tag(curlev+1,maxlev)
%end;
%end;
%end;
%end;
%( main %)
%apply;togen()
%apply;tool()