open Netcgi let main (cgi : Netcgi.std_activation) = try cgi # set_header (); let src = cgi # argument_value "prog" in let ppf = Format.str_formatter and input = Stream.of_string src in Location.set_source (`String src); Location.set_viewport `Html; Load_xml.set_auth false; Cduce.run ppf input; let res = Format.flush_str_formatter () in cgi # output # output_string ("\ CDuce online prototype

CDuce online prototype

" ^ res ^ "
"); cgi # output # commit_work() with exn -> cgi # output # rollback_work(); cgi # set_header ~status:`Internal_server_error (); cgi # output # output_string "

Internal software error!

"; cgi # output # output_string (Printexc.to_string exn); cgi # output # commit_work() let () = let operating_type = Netcgi.buffered_transactional_optype in let cgi = new Netcgi.std_activation ~operating_type () in main cgi; cgi # finalize ()