]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/gdome_xslt/ocaml/gdome_xslt/gdome_xslt.ml
ocaml 3.09 transition
[helm.git] / helm / DEVEL / gdome_xslt / ocaml / gdome_xslt / gdome_xslt.ml
index 6ca611cb36e0c320a2ffb9e089da4d1554254d48..b64a006b4c312baace2ea2a7cd5a05e01412abf0 100644 (file)
@@ -4,7 +4,9 @@
  * The code is largely based on the code of T.J. Mather's XML::GDOME::XSLT
  * Perl module (http://kobesearch.cpan.org/search?dist=XML-GDOME-XSLT)
  *
- * Copyright (C) 2002 Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>
+ * Copyright (C) 2002:
+ *     Claudio Sacerdoti Coen  <sacerdot@cs.unibo.it>
+ *     Stefano Zacchiroli      <zack@cs.unibo.it>
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -20,7 +22,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * For more information, please send an email to <sacerdot@cs.unibo.it>
+ * For more information, please send an email to {sacerdot,zack}@cs.unibo.it
  *)
 
 let processStylesheet style =
@@ -34,3 +36,24 @@ let applyStylesheet ~source ~stylesheet ~params =
  in
   new Gdome.document res
 ;;
+
+let saveResultToChannel ~outchan ~result ~stylesheet =
+  I_gdome_xslt.saveResultToChannel
+    ~outchan
+    ~result:result#as_Document
+    ~stylesheet
+;;
+
+let setErrorCallback = function
+  | None -> I_gdome_xslt.disableErrorCallback ()
+  | Some (callback: string -> unit) ->
+      Callback.register "error_callback" callback;
+      I_gdome_xslt.enableErrorCallback ()
+;;
+let setDebugCallback = function
+  | None -> I_gdome_xslt.disableDebugCallback ()
+  | Some (callback: string -> unit) ->
+      Callback.register "debug_callback" callback;
+      I_gdome_xslt.enableDebugCallback ()
+;;
+