package cpdf

  1. Overview
  2. Docs

Parameters

module String : String
module Buffer : Buffer with type string = String.t

Signature

type string = String.t
val str : std_string -> String.t
val str_eq : 'a -> 'b -> bool
val str_empty : String.t -> bool
val cat : String.t -> String.t -> String.t
val str_of_char : int -> Buffer.string
module Ht : sig ... end
val u_nl : int
val u_cr : int
val u_space : int
val u_quot : int
val u_sharp : int
val u_amp : int
val u_apos : int
val u_minus : int
val u_slash : int
val u_colon : int
val u_scolon : int
val u_lt : int
val u_eq : int
val u_gt : int
val u_qmark : int
val u_emark : int
val u_lbrack : int
val u_rbrack : int
val u_x : int
val u_bom : int
val u_9 : int
val u_F : int
val u_D : int
val s_cdata : String.t
val ns_xml : String.t
val ns_xmlns : String.t
val n_xml : String.t
val n_xmlns : String.t
val n_space : String.t
val n_version : String.t
val n_encoding : String.t
val n_standalone : String.t
val v_yes : String.t
val v_no : String.t
val v_preserve : String.t
val v_default : String.t
val v_version_1_0 : String.t
val v_version_1_1 : String.t
val v_utf_8 : String.t
val v_utf_16 : String.t
val v_utf_16be : String.t
val v_utf_16le : String.t
val v_iso_8859_1 : String.t
val v_us_ascii : String.t
val v_ascii : String.t
val name_str : (String.t * String.t) -> String.t
type encoding = [
  1. | `UTF_8
  2. | `UTF_16
  3. | `UTF_16BE
  4. | `UTF_16LE
  5. | `ISO_8859_1
  6. | `US_ASCII
]
type dtd = string option
type name = string * string
type attribute = name * string
type tag = name * attribute list
type signal = [
  1. | `Dtd of dtd
  2. | `El_start of tag
  3. | `El_end
  4. | `Data of string
]
type pos = int * int
type error = [
  1. | `Max_buffer_size
  2. | `Unexpected_eoi
  3. | `Malformed_char_stream
  4. | `Unknown_encoding of string
  5. | `Unknown_entity_ref of string
  6. | `Unknown_ns_prefix of string
  7. | `Illegal_char_ref of string
  8. | `Illegal_char_seq of string
  9. | `Expected_char_seqs of string list * string
  10. | `Expected_root_element
]
exception Error of pos * error
val error_message : [< `Expected_char_seqs of String.t list * String.t | `Expected_root_element | `Illegal_char_ref of String.t | `Illegal_char_seq of String.t | `Malformed_char_stream | `Max_buffer_size | `Unexpected_eoi | `Unknown_encoding of String.t | `Unknown_entity_ref of String.t | `Unknown_ns_prefix of String.t ] -> String.t
type limit =
  1. | Stag of name
  2. | Etag of name
  3. | Pi of name
  4. | Comment
  5. | Cdata
  6. | Dtd
  7. | Text
  8. | Eoi
type source = [
  1. | `Channel of in_channel
  2. | `String of int * std_string
  3. | `Fun of unit -> int
]
type input = {
  1. enc : encoding option;
  2. strip : bool;
  3. fun_ns : string -> string option;
  4. fun_entity : string -> string option;
  5. i : unit -> int;
  6. mutable uchar : (unit -> int) -> int;
  7. mutable c : int;
  8. mutable cr : bool;
  9. mutable line : int;
  10. mutable col : int;
  11. mutable limit : limit;
  12. mutable peek : signal;
  13. mutable stripping : bool;
  14. mutable last_white : bool;
  15. mutable scopes : (name * string list * bool) list;
  16. ns : string Ht.t;
  17. ident : Buffer.t;
  18. data : Buffer.t;
}
val err_input_tree : string
val err_input_doc_tree : string
val err : input -> error -> 'a
val err_illegal_char : input -> int -> 'a
val err_expected_seqs : input -> string list -> string -> 'a
val err_expected_chars : input -> int list -> 'a
val u_eoi : int
val u_start_doc : int
val u_end_doc : int
val signal_start_stream : [> `Data of String.t ]
val make_input : ?enc:encoding option -> ?strip:bool -> ?ns:(string -> string option) -> ?entity:(string -> string option) -> [< `Channel of in_channel | `Fun of unit -> int | `String of int * string ] -> input
val r : int -> int -> int -> bool
val is_white : int -> bool
val is_char : int -> bool
val is_digit : int -> bool
val is_hex_digit : int -> bool
val comm_range : int -> bool
val is_name_start_char : int -> bool
val is_name_char : int -> bool
val nextc : input -> unit
val nextc_eof : input -> unit
val skip_white : input -> unit
val skip_white_eof : input -> unit
val accept : input -> int -> unit
val clear_ident : input -> unit
val clear_data : input -> unit
val addc_ident : input -> int -> unit
val addc_data : input -> int -> unit
val addc_data_strip : input -> int -> unit
val expand_name : input -> (Ht.key * 'a) -> string * 'b
val find_encoding : input -> bool
val p_ncname : input -> Buffer.string
val p_qname : input -> Buffer.string * Buffer.string
val p_charref : input -> Buffer.string
val predefined_entities : String.t Ht.t
val p_entity_ref : input -> string
val p_reference : input -> Buffer.string
val p_attr_value : input -> Buffer.string
val p_attributes : input -> Buffer.string list * ((Buffer.string * Buffer.string) * Buffer.string) list
val p_limit : input -> unit
val skip_comment : input -> unit
val skip_pi : input -> unit
val skip_misc : input -> allow_xmlpi:bool -> unit
val p_chardata : (input -> int -> unit) -> input -> unit
val p_cdata : (input -> int -> unit) -> input -> unit
val p_xml_decl : input -> ignore_enc:bool -> ignore_utf16:bool -> unit
val p_dtd_signal : input -> [> `Dtd of Buffer.string option ]
val p_data : input -> Buffer.string
val p_el_start_signal : input -> name -> [> `El_start of (string * string) * ((string * Buffer.string) * Buffer.string) list ]
val p_el_end_signal : input -> name -> [> `El_end ]
val p_signal : input -> [> `Data of Buffer.string | `El_end | `El_start of (string * string) * ((string * Buffer.string) * Buffer.string) list ]
val eoi : input -> bool
val peek : input -> signal
val input : input -> signal
val input_tree : el:(tag -> 'a list -> 'b) -> data:(string -> 'c) -> input -> 'd
val input_doc_tree : el:(tag -> 'a list -> 'a) -> data:(string -> 'a) -> input -> dtd * 'b
val pos : input -> int * int
type 'a frag = [
  1. | `El of tag * 'a list
  2. | `Data of string
]
type dest = [
  1. | `Channel of out_channel
  2. | `Buffer of std_buffer
  3. | `Fun of int -> unit
]
type output = {
  1. decl : bool;
  2. nl : bool;
  3. indent : int option;
  4. fun_prefix : string -> string option;
  5. prefixes : string Ht.t;
  6. outs : std_string -> int -> int -> unit;
  7. outc : char -> unit;
  8. mutable last_el_start : bool;
  9. mutable scopes : (name * string list) list;
  10. mutable depth : int;
}
val err_prefix : string -> string
val err_dtd : string
val err_el_start : string
val err_el_end : string
val err_data : string
val make_output : ?decl:bool -> ?nl:bool -> ?indent:int option -> ?ns_prefix:(string -> string option) -> [< `Buffer of Std_buffer.t | `Channel of out_channel | `Fun of int -> unit ] -> output
val output_depth : output -> int
val outs : output -> std_string -> unit
val str_utf_8 : String.t -> std_string
val out_utf_8 : output -> String.t -> unit
val prefix_name : output -> (Ht.key * String.t) -> string * String.t
val bind_prefixes : output -> ((String.t * string) * Ht.key) list -> Ht.key list
val out_data : output -> String.t -> unit
val out_qname : output -> (String.t * String.t) -> unit
val out_attribute : output -> ((Ht.key * String.t) * String.t) -> unit
val output : output -> [< `Data of 'a & String.t | `Dtd of String.t option & 'b | `El_end | `El_start of 'c & (Ht.key * string) * ((Ht.key * string) * Ht.key) list ] -> unit
val output_tree : ('a -> [< `Data of String.t | `El of ((Ht.key * string) * ((Ht.key * string) * Ht.key) list) * 'b list ]) -> output -> 'c -> unit
val output_doc_tree : ('a -> [< `Data of String.t | `El of ((Ht.key * string) * ((Ht.key * string) * Ht.key) list) * 'a list ]) -> output -> (String.t option * 'b) -> unit
OCaml

Innovation. Community. Security.