;;
let pp_to_gzipchan strm oc =
- pp_gen (fun s -> Gzip.output oc s 0 (String.length s)) strm;
- Gzip.flush oc
+ pp_gen (fun s -> Gzip.output oc s 0 (String.length s)) strm
(** pretty printer to string *)
let pp_to_string strm =
close_out outchan
| None -> pp_to_outchan strm stdout
;;
+
+let add_xml_declaration stream =
+ let box_prefix = "b" in
+ [<
+ xml_cdata "<?xml version=\"1.0\" ?>\n" ;
+ xml_cdata "\n";
+ xml_nempty ~prefix:box_prefix "box"
+ [ Some "xmlns","m","http://www.w3.org/1998/Math/MathML" ;
+ Some "xmlns","b","http://helm.cs.unibo.it/2003/BoxML" ;
+ Some "xmlns","helm","http://www.cs.unibo.it/helm" ;
+ Some "xmlns","xlink","http://www.w3.org/1999/xlink"
+ ] stream
+ >]
+