]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/uwobo/src/ocaml/uwobo_engine.ml
snapshot Fri, 29 Nov 2002 12:38:23 +0100 zack
[helm.git] / helm / uwobo / src / ocaml / uwobo_engine.ml
index 9e4850bbb6a3b35c5b617b50ebca37715c1f051f..bda9b1804e9a7f1ba550d0ca23649d61b6a193c5 100644 (file)
@@ -29,7 +29,6 @@ open Uwobo_common;;
 
 let dump_args keys params props =
   (sprintf "
-<h1>Uwobo_engine.apply: not yet implemented!</h1>
 Keys: %s<br />
 Parameters:<br />
 %s
@@ -55,17 +54,20 @@ Props: %s<br />
 
   (* TODO add global mutex, stylesheets are freezed at the request moment *)
 let apply
-  ~(logger: Uwobo_logger.processingLogger)
+  ~(logger: Uwobo_logger.sysLogger)
   ~(styles: Uwobo_styles.styles)
   ~keys ~params ~props ~input =
   let stylesheets = styles#get keys in
-  logger#log (dump_args keys params props);
-  logger#log "Creating input document ...";
+  logger#log `Debug (dump_args keys params props);
+  logger#log `Debug "Creating input document ...";
   List.fold_left
     (fun source (key, stylesheet) ->
-      logger#log (sprintf "Applying stylesheet %s ..." key);
+      logger#log `Debug (sprintf "Applying stylesheet %s ..." key);
       try
-        Gdome_xslt.applyStylesheet ~source ~stylesheet ~params:(params key)
+        let params =
+          List.map (fun (key,value) -> (key, "'" ^ value ^ "'")) (params key)
+        in
+        Gdome_xslt.applyStylesheet ~source ~stylesheet ~params
       with e -> raise (Uwobo_failure (Printexc.to_string e)))
     input
     stylesheets