]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/uwobo/uwobo_common.mli
ocaml 3.09 transition
[helm.git] / helm / uwobo / uwobo_common.mli
index a531d8a0b4c9230fa5001dd8a5fd02cd8429abb5..9bd90c5146f5784d93a08f87cb04b2b7db4533f6 100644 (file)
 
 exception Uwobo_failure of string
 
+  (** XML namespace of UWOBO generated XML elements *)
+val uwobo_namespace: string
+
 val supported_properties: string list
 val is_supported_property: string -> bool
 
 val version: string (** version *)
 val usage_string: string  (** HTTP GET usage string *)
 
-  (** return an ok (200) http response, which display in html an error message
-  *)
-val return_error: string -> out_channel -> unit
+  (** return an ok (200) http response, which display in html an error message.
+  Error title is reported inside an h1 tag; error body, if given, follows *)
+val return_error: string -> ?body: string -> out_channel -> unit
   (** return a 400 (bad request) http response *)
 val bad_request: string -> out_channel -> unit
 
+  (** {2 LibXSLT logging} *)
+
+  (** libxslt's message *)
+type xslt_msg =
+  | LibXsltErrorMsg of string   (** libxslt's error messages *)
+  | LibXsltDebugMsg of string   (** libxslt's debugging messages *)
+
+  (** pretty print a xslt_msg *)
+val string_of_xslt_msg: xslt_msg -> string
+
+  (** libxslt's message reporting mode. That is: how to report libxslt's
+  messages during apply method *)
+type xslt_msg_mode =
+  | LibXsltMsgIgnore    (** Ignore some kind of messages *)
+  | LibXsltMsgComment   (** Embed in XML comments some kind of messages *)
+  | LibXsltMsgEmbed     (** Embed in XML elements some kind of messages *)
+
+class libXsltLogger:
+  object
+
+    method clearMsgs: unit
+    method clearErrorMsgs: unit
+    method clearDebugMsgs: unit
+
+    method msgs: xslt_msg list
+    method errorMsgs: string list
+    method debugMsgs: string list
+
+  end
+