-(* alternative implementation *)
-let mapl = [
- ("ge_closure",0);("gt_closure",1);("eq_closure",2);
- ("in_gegt_of", 3);
- ("one_s_ge", 4);("one_s_gt", 5);("one_s_eq", 6)]
-;;
-
-let assigner_of' s = List.assoc s mapl ;;
-
-let entry_of_array a = {
- ge_closure = a.(0); gt_closure = a.(1); eq_closure = a.(2);
- in_gegt_of = a.(3);
- one_s_ge = a.(4); one_s_gt = a.(5); one_s_eq = a.(6)}
-;;
-
-let cb_factory' m =
- let module XPP = XmlPushParser in
- let current_node = ref (0,None) in
- let current_entry = Array.create 7 SOF.empty in
- let current_assign = ref 0 in
- { XPP.default_callbacks with
- XPP.start_element = Some( fun name attlist ->
- match name with
- | "entry" ->
- let id = List.assoc "id" attlist in
- let uri = List.assoc "uri" attlist in
- current_node := (int_of_string id,Some (UriManager.uri_of_string uri))
- | "node" ->
- let id = int_of_string (List.assoc "id" attlist) in
- let uri = List.assoc "uri" attlist in
- current_entry.(!current_assign) <-
- SOF.add (id,Some (UriManager.uri_of_string uri))
- current_entry.(!current_assign)
- | s -> current_assign := assigner_of' s
- );
- XPP.end_element = Some( fun name ->
- match name with
- | "entry" ->
- m := MAL.add !current_node (entry_of_array current_entry) !m;
- Array.fill current_entry 0 7 SOF.empty
- | _ -> ()
- );
- }
-;;
-
-
-let ugraph_of_xml filename =