]> matita.cs.unibo.it Git - helm.git/commitdiff
moved add_xml_declaration here
authorStefano Zacchiroli <zack@upsilon.cc>
Mon, 25 Jul 2005 10:13:46 +0000 (10:13 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Mon, 25 Jul 2005 10:13:46 +0000 (10:13 +0000)
helm/ocaml/xml/xml.ml
helm/ocaml/xml/xml.mli

index cee7ccd6d187249b7ac2a4c3736c70a9efe01faf..6d6775c6deeccb4c1f11ce3c9e25e755b8a43aef 100644 (file)
@@ -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 "<?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
+  >]
+
index b1fcbe5b064bdc8a224b3b73b07c9b78a88b526a..43547eaa03fdbc5a1aadeeea11bc5f29b9594ab4 100644 (file)
@@ -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
+