]> matita.cs.unibo.it Git - helm.git/blob - helm/uwobo/uwobo_styles.mli
added keys method that list currently loaded stylesheets' keys
[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 exception Stylesheet_not_found of string ;;
30 exception Stylesheet_already_in of string ;;
31
32   (** libxslt's message *)
33 type xslt_msg =
34   | LibXsltErrorMsg of string  (** libxslt's error messages *)
35   | LibXsltDebugMsg of string  (** libxslt's debugging messages *)
36 type log = xslt_msg list ;;
37
38   (** hold UWOBO styles at runtime *)
39 class styles:
40   object
41
42     (** {2 Stylesheets management} *)
43
44       (** add a stylesheet, bound to a given key, to the UWOBO loaded
45       stylesheets
46       @param key key to which the stylesheets will be bound
47       @param uri uri of the stylesheet to be loaded
48       @raise Stylesheet_already_in if key is already bound *)
49     method add: string -> string -> log
50
51       (** remove the stylesheet bound to a given key *)
52     method remove: string -> log
53
54       (** remove all loaded stylesheet *)
55     method removeAll: log
56
57       (** reload the stylesheet bound to a given key *)
58     method reload: string -> log
59
60       (** reload all stylesheets *)
61     method reloadAll: log
62
63     (** {2 Stylesheets usage} *)
64
65       (** @return the list of currently loaded stylesheets' keys *)
66     method keys: string list
67
68       (** @return a list of strings, each string is a textual representation of
69       information related to a loaded stylesheet. This representation includes
70       at least stylesheet's key and URI *)
71     method list: string list
72
73       (** @param key_list list of keys
74       @return a pair. First component of the returned pair is an association
75       list that maps given keys to gdome2-xslt processed stylesheets. Second
76       component of the returned pair is an unprocessed version of the
77       stylesheets corresponding to the latest key provided *)
78     method get:
79       string list ->
80         (string * I_gdome_xslt.processed_stylesheet) list * Gdome.document
81
82   end
83