let filterAnnotations attr =
let rec find acc annot = function
| [] -> acc
| x :: l when attributeName x = annot -> find (annot :: acc) annot l
| _ :: l -> find acc annot l
in
List.fold_left (fun acc a -> find acc a attr) [] S.possible_annotations