2 (* Copyright (C) 2002, HELM Team.
4 * This file is part of HELM, an Hypertextual, Electronic
5 * Library of Mathematics, developed at the Computer Science
6 * Department, University of Bologna, Italy.
8 * HELM is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * HELM is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with HELM; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23 * For details, see the HELM World-Wide-Web page,
24 * http://cs.unibo.it/helm/.
30 let dump_args keys params props =
32 <h1>Uwobo_engine.apply: not yet implemented!</h1>
38 (String.concat ", " keys)
49 (fun (key,value) -> sprintf "%s:%s" key value)
54 (List.map (fun (key,value) -> sprintf "%s:%s" key value) props)))
56 (* TODO add global mutex, stylesheets are freezed at the request moment *)
58 ~(logger: Uwobo_logger.processingLogger)
59 ~(styles: Uwobo_styles.styles)
60 ~keys ~params ~props ~input =
61 let stylesheets = styles#get keys in
62 logger#log (dump_args keys params props);
63 logger#log "Creating input document ...";
65 (fun source (key, stylesheet) ->
66 logger#log (sprintf "Applying stylesheet %s ..." key);
68 Gdome_xslt.applyStylesheet ~source ~stylesheet ~params:(params key)
69 with e -> raise (Uwobo_failure (Printexc.to_string e)))