From 7a2a40e0cc7d9ad114c5e2b60427062b34bb9d56 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Mon, 25 Jul 2005 10:13:46 +0000 Subject: [PATCH] moved add_xml_declaration here --- helm/ocaml/xml/xml.ml | 14 ++++++++++++++ helm/ocaml/xml/xml.mli | 2 ++ 2 files changed, 16 insertions(+) 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 + -- 2.39.2