]> matita.cs.unibo.it Git - helm.git/blob - helm/interface/xml.mli
Initial revision
[helm.git] / helm / interface / xml.mli
1 (******************************************************************************)
2 (*                                                                            *)
3 (*                               PROJECT HELM                                 *)
4 (*                                                                            *)
5 (*                     A tactic to print Coq objects in XML                   *)
6 (*                                                                            *)
7 (*                Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>               *)
8 (*                                 18/10/2000                                 *)
9 (*                                                                            *)
10 (* This module defines a pretty-printer and the stream of commands to the pp  *)
11 (*                                                                            *)
12 (******************************************************************************)
13
14 (* Tokens for XML cdata, empty elements and not-empty elements           *)
15 (* Usage:                                                                *)
16 (*  Str cdata                                                            *)
17 (*  Empty (element_name, [attrname1, value1 ; ... ; attrnamen, valuen]   *)
18 (*  NEmpty (element_name, [attrname1, value2 ; ... ; attrnamen, valuen], *)
19 (*          content                                                      *)
20 type token =
21   | Str of string
22   | Empty of string * (string * string) list
23   | NEmpty of string * (string * string) list * token Stream.t
24
25 (* currified versions of the token constructors make the code more readable *)
26 val xml_empty : string -> (string * string) list -> token Stream.t
27 val xml_nempty :
28   string -> (string * string) list -> token Stream.t -> token Stream.t
29 val xml_cdata : string -> token Stream.t
30
31 (* The pretty printer for streams of token                                  *)
32 (* Usage:                                                                   *)
33 (*  pp tokens None     pretty prints the output on stdout                   *)
34 (*  pp tokens (Some filename) pretty prints the output on the file filename *)
35 val pp : token Stream.t -> string option -> unit