From: Stefano Zacchiroli Date: Mon, 25 Jul 2005 10:13:46 +0000 (+0000) Subject: moved add_xml_declaration here X-Git-Tag: V_0_7_2~93 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;ds=inline;h=7a2a40e0cc7d9ad114c5e2b60427062b34bb9d56;p=helm.git moved add_xml_declaration here --- diff --git a/helm/ocaml/xml/xml.ml b/helm/ocaml/xml/xml.ml index cee7ccd6d..6d6775c6d 100644 --- a/helm/ocaml/xml/xml.ml +++ b/helm/ocaml/xml/xml.ml @@ -139,3 +139,17 @@ let pp ?(gzip=false) strm fn = close_out outchan | None -> pp_to_outchan strm stdout ;; + +let add_xml_declaration stream = + let box_prefix = "b" in + [< + xml_cdata "\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 + >] + diff --git a/helm/ocaml/xml/xml.mli b/helm/ocaml/xml/xml.mli index b1fcbe5b0..43547eaa0 100644 --- a/helm/ocaml/xml/xml.mli +++ b/helm/ocaml/xml/xml.mli @@ -69,3 +69,5 @@ val pp : ?gzip:bool -> token Stream.t -> string option -> unit val pp_to_outchan : token Stream.t -> out_channel -> unit val pp_to_string : token Stream.t -> string +val add_xml_declaration: token Stream.t -> token Stream.t +