]> matita.cs.unibo.it Git - helm.git/blob - helm/uwobo/uwobo_styles.mli
ocaml 3.09 transition
[helm.git] / helm / uwobo / uwobo_styles.mli
1 (*
2  * Copyright (C) 2003:
3  *    Stefano Zacchiroli <zack@cs.unibo.it>
4  *    for the HELM Team http://helm.cs.unibo.it/
5  *
6  *  This file is part of HELM, an Hypertextual, Electronic
7  *  Library of Mathematics, developed at the Computer Science
8  *  Department, University of Bologna, Italy.
9  *
10  *  HELM is free software; you can redistribute it and/or
11  *  modify it under the terms of the GNU General Public License
12  *  as published by the Free Software Foundation; either version 2
13  *  of the License, or (at your option) any later version.
14  *
15  *  HELM is distributed in the hope that it will be useful,
16  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  *  GNU General Public License for more details.
19  *
20  *  You should have received a copy of the GNU General Public License
21  *  along with HELM; if not, write to the Free Software
22  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23  *  MA  02111-1307, USA.
24  *
25  *  For details, see the HELM World-Wide-Web page,
26  *  http://helm.cs.unibo.it/
27  *)
28
29 open Uwobo_common ;;
30
31 exception Stylesheet_not_found of string ;;
32 exception Stylesheet_already_in of string ;;
33
34   (** hold UWOBO styles at runtime *)
35 class styles:
36   object
37
38     (** {2 Stylesheets management} *)
39
40       (** add a stylesheet, bound to a given key, to the UWOBO loaded
41       stylesheets
42       @param key key to which the stylesheets will be bound
43       @param uri uri of the stylesheet to be loaded
44       @raise Stylesheet_already_in if key is already bound *)
45     method add: string -> string -> unit
46
47       (** remove the stylesheet bound to a given key *)
48     method remove: string -> unit
49
50       (** remove all loaded stylesheet *)
51     method removeAll: unit
52
53       (** reload the stylesheet bound to a given key *)
54     method reload: string -> unit
55
56       (** reload all stylesheets *)
57     method reloadAll: unit
58
59     (** {2 Stylesheets usage} *)
60
61       (** @return the list of currently loaded stylesheets' keys *)
62     method keys: string list
63
64       (** @return a list of strings, each string is a textual representation of
65       information related to a loaded stylesheet. This representation includes
66       at least stylesheet's key and URI *)
67     method list: string list
68
69       (**
70       @param key_list non empty list of keys
71       @param props list of prop
72       @param logger the logger to be used to report errors and warnings
73       @return a pair. The first argument of the pair is an association list
74       that maps given keys to gdome2-xslt processed stylesheets. The last
75       stylesheet xsl:output element is modified according to the given
76       properties. The second argument of the pair is the last unprocessed
77       stylesheet.
78       *)
79     method get:
80       string list -> (string * string) list -> Uwobo_logger.sysLogger ->
81         (string * I_gdome_xslt.processed_stylesheet) list * Gdome.document
82
83   end
84