X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Fgdome_xslt%2Focaml%2Fgdome_xslt%2Fgdome_xslt.ml;h=b64a006b4c312baace2ea2a7cd5a05e01412abf0;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=6ca611cb36e0c320a2ffb9e089da4d1554254d48;hpb=0474bcec6d3bb8972eec0964a34872712122f340;p=helm.git diff --git a/helm/DEVEL/gdome_xslt/ocaml/gdome_xslt/gdome_xslt.ml b/helm/DEVEL/gdome_xslt/ocaml/gdome_xslt/gdome_xslt.ml index 6ca611cb3..b64a006b4 100644 --- a/helm/DEVEL/gdome_xslt/ocaml/gdome_xslt/gdome_xslt.ml +++ b/helm/DEVEL/gdome_xslt/ocaml/gdome_xslt/gdome_xslt.ml @@ -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 + * Copyright (C) 2002: + * Claudio Sacerdoti Coen + * Stefano Zacchiroli * * 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 + * 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 () +;; +