module U = NUri
module H = Hierarchy
+type 'a out = (unit -> 'a) -> string -> 'a
+
(* internal functions *******************************************************)
let base = "xml"
(* interface functions ******************************************************)
-let export_entity export_entry si g = function
+let old_export_entity export_entry si g = function
| Some entry ->
let _, uri, bind = entry in
let path = path_of_uri uri in
pp_head pp_doctype (open_entry si g) export_entry entry close_entry;
close_out och
| None -> ()
+
+(****************************************************************************)
+(*
+let export_entity export_entry si g = function
+ | Some entry ->
+ let _, uri, bind = entry in
+ let path = path_of_uri root uri in
+ let _ = Sys.command (Printf.sprintf "mkdir -p %s" (F.dirname path)) in
+ let och = open_out (path ^ obj_ext) in
+ let out f s = output_string och s; f () in
+ let f () = close_out och in
+
+ Format.fprintf frm "@[<v>%t%t%t%a%t@]@."
+ pp_head pp_doctype (open_entry si g) export_entry entry close_entry;
+ close_out och
+ | None -> ()
+*)