- let cicbodyfilename = G.getxml (U.cicuri_of_uri bodyuri) in
- CicParser.obj_of_xml cicfilename (Some cicbodyfilename)
+ let cicbodyfilename =
+ try
+ ignore (Http_getter.resolve' bodyuri) ;
+ (* The body exists ==> it is not an axiom *)
+ Some (Http_getter.getxml' bodyuri)
+ with Http_getter_types.Unresolvable_URI _ ->
+ (* The body does not exist ==> we consider it an axiom *)
+ None
+ in
+ let obj = CicParser.obj_of_xml cicfilename cicbodyfilename in
+ Unix.unlink cicfilename ;
+ (match cicbodyfilename with None -> () | Some f -> Unix.unlink f) ;
+ obj