]> matita.cs.unibo.it Git - helm.git/blob - helm/uwobo/uwobo_common.mli
ocaml 3.09 transition
[helm.git] / helm / uwobo / uwobo_common.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 Uwobo_failure of string
30
31   (** XML namespace of UWOBO generated XML elements *)
32 val uwobo_namespace: string
33
34 val supported_properties: string list
35 val is_supported_property: string -> bool
36
37 val version: string (** version *)
38 val usage_string: string  (** HTTP GET usage string *)
39
40   (** return an ok (200) http response, which display in html an error message.
41   Error title is reported inside an h1 tag; error body, if given, follows *)
42 val return_error: string -> ?body: string -> out_channel -> unit
43   (** return a 400 (bad request) http response *)
44 val bad_request: string -> out_channel -> unit
45
46   (** {2 LibXSLT logging} *)
47
48   (** libxslt's message *)
49 type xslt_msg =
50   | LibXsltErrorMsg of string   (** libxslt's error messages *)
51   | LibXsltDebugMsg of string   (** libxslt's debugging messages *)
52
53   (** pretty print a xslt_msg *)
54 val string_of_xslt_msg: xslt_msg -> string
55
56   (** libxslt's message reporting mode. That is: how to report libxslt's
57   messages during apply method *)
58 type xslt_msg_mode =
59   | LibXsltMsgIgnore    (** Ignore some kind of messages *)
60   | LibXsltMsgComment   (** Embed in XML comments some kind of messages *)
61   | LibXsltMsgEmbed     (** Embed in XML elements some kind of messages *)
62
63 class libXsltLogger:
64   object
65
66     method clearMsgs: unit
67     method clearErrorMsgs: unit
68     method clearDebugMsgs: unit
69
70     method msgs: xslt_msg list
71     method errorMsgs: string list
72     method debugMsgs: string list
73
74   end
75