module Xml_print:sig..end
This module contains various encoding functions that can be used
with Tyxml.Html.pp and Tyxml.Svg.pp.
It also contains functors to create printers for your own XML data structure.
val encode_unsafe_char : string -> string'<', '>', '"', '&' and the control characters 0-8, 11-12, 14-31, 127
to HTML entities. encode_unsafe_char is the default for ?encode in output
and pretty_print below. Other implementations are provided by the module
Netencoding in the
OcamlNet
library, e.g.:
let encode = Netencoding.Html.encode ~in_enc:`Enc_iso88591 ~out_enc:`Enc_usascii ()
Where national characters are replaced by HTML entities.
The user is of course free to write her own implementation.val encode_unsafe_char_and_at : string -> string"@" as "@" in the hope that this will fool
simple minded email address harvesters.module Utf8:sig..end
val compose_decl : ?version:string -> ?encoding:string -> unit -> stringencoding is the name of the character encoding, e.g. "US-ASCII" or "UTF-8"val compose_doctype : string -> string list -> string
val string_of_number : float -> stringval pp_number : Format.formatter -> float -> unit
module Make_typed_fmt(Xml:Xml_sigs.Iterable)(Typed_xml:Xml_sigs.Typed_xmlwith module Xml := Xml):Xml_sigs.Typed_ppwith type 'a elt := 'a Typed_xml.elt and type doc := Typed_xml.doc
module type TagList =sig..end
<foo />.
module Make_fmt(Xml:Xml_sigs.Iterable)(I:TagList):Xml_sigs.Ppwith type elt := Xml.elt
Use Xml_print.Make_fmt and Xml_print.Make_typed_fmt instead.
module Make(Xml:Xml_sigs.Iterable)(I:TagList)(O:Xml_sigs.Output):Xml_sigs.Printerwith type out := O.out and type xml_elt := Xml.elt
module Make_typed(Xml:Xml_sigs.Iterable)(Typed_xml:Xml_sigs.Typed_xmlwith module Xml := Xml)(O:Xml_sigs.Output):Xml_sigs.Typed_printerwith type out := O.out and type 'a elt := 'a Typed_xml.elt and type doc := Typed_xml.doc
module Make_simple(Xml:Xml_sigs.Iterable)(I:TagList):Xml_sigs.Simple_printerwith type xml_elt := Xml.elt
module Make_typed_simple(Xml:Xml_sigs.Iterable)(Typed_xml:Xml_sigs.Typed_xmlwith module Xml := Xml):Xml_sigs.Typed_simple_printerwith type 'a elt := 'a Typed_xml.elt and type doc := Typed_xml.doc