]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/daemons/uwobo/uwobo_engine.ml
we set the http daemon timeout to 15 minutes, which is the default timeout of wget...
[helm.git] / helm / software / daemons / uwobo / uwobo_engine.ml
index 03a3b424d726f1c65faa2693529fc06b9415dd41..f0b8b97226e818567c01e94ac221d5c4eaf8670d 100644 (file)
@@ -202,7 +202,7 @@ let apply
   let (p_stylesheets,last_stylesheet) = styles#get keys props logger in
   logger#log `Debug "Creating input document ...";
   let intermediate_results_seqno = ref 0 in
-  let result = (* Gdome.document *)
+  let result () = (* Gdome.document *)
     List.fold_left
       (fun source (key, stylesheet) ->
         logger#log `Debug (sprintf "Applying stylesheet %s ..." key);
@@ -245,8 +245,11 @@ let apply
       input
       p_stylesheets
   in
+  let p_last_stylesheet = snd (List.hd (List.rev p_stylesheets)) in
+  ((fun outchan ->                              (* serialization function *)
+      let result = result () in
     (* add error and debugging messages to result document *)
-  add_msgs ~errormode ~debugmode ~msgs:veillogger#msgs result;
+      add_msgs ~errormode ~debugmode ~msgs:veillogger#msgs result;
 (*
   (* DEBUGGING *)
   add_msgs
@@ -254,10 +257,7 @@ let apply
     ~msgs:[LibXsltErrorMsg "error1"; LibXsltDebugMsg "debug1"]
     result;
 *)
-  let p_last_stylesheet = snd (List.hd (List.rev p_stylesheets)) in
-  ((fun outchan ->                              (* serialization function *)
       Gdome_xslt.saveResultToChannel ~outchan ~result
         ~stylesheet:p_last_stylesheet),
    (get_property "media-type" last_stylesheet), (* media-type *)
    (get_property "encoding" last_stylesheet))   (* encoding *)
-