X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fdaemons%2Fuwobo%2Fuwobo_engine.ml;h=f0b8b97226e818567c01e94ac221d5c4eaf8670d;hb=1c4968498b6f108cd9c4074c177845a4067cd9d6;hp=03a3b424d726f1c65faa2693529fc06b9415dd41;hpb=76ad23ea1e83e8c187a4593027e9baed1bb022e3;p=helm.git diff --git a/helm/software/daemons/uwobo/uwobo_engine.ml b/helm/software/daemons/uwobo/uwobo_engine.ml index 03a3b424d..f0b8b9722 100644 --- a/helm/software/daemons/uwobo/uwobo_engine.ml +++ b/helm/software/daemons/uwobo/uwobo_engine.ml @@ -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 *) -