]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/pxp/pxp/compatibility/markup_types.mli
b33bb30b2d43aebb58857281431aff2481c1d0b8
[helm.git] / helm / DEVEL / pxp / pxp / compatibility / markup_types.mli
1 (* $Id$
2  * ----------------------------------------------------------------------
3  * Markup! The validating XML parser for Objective Caml.
4  * Copyright 1999 by Gerd Stolpmann. See LICENSE for details.
5  *
6  * THIS IS THE markup-0.2.10 COMPATIBLE INTERFACE TO markup_types.mli.
7  * It corresponds to revision 1.7 of markup_types.mli.
8  *)
9
10
11 type ext_id = Pxp_types.ext_id =
12     System of string
13   | Public of (string * string)
14   | Anonymous
15 type dtd_id = Pxp_types.dtd_id =
16     External of ext_id
17   | Derived of ext_id
18   | Internal
19 type content_model_type = Pxp_types.content_model_type =
20     Unspecified
21   | Empty
22   | Any
23   | Mixed of mixed_spec list
24   | Regexp of regexp_spec
25 and mixed_spec = Pxp_types.mixed_spec =
26     MPCDATA
27   | MChild of string
28 and regexp_spec = Pxp_types.regexp_spec =
29     Optional of regexp_spec
30   | Repeated of regexp_spec
31   | Repeated1 of regexp_spec
32   | Alt of regexp_spec list
33   | Seq of regexp_spec list
34   | Child of string
35 type att_type = Pxp_types.att_type =
36     A_cdata
37   | A_id
38   | A_idref
39   | A_idrefs
40   | A_entity
41   | A_entities
42   | A_nmtoken
43   | A_nmtokens
44   | A_notation of string list
45   | A_enum of string list
46 type att_default = Pxp_types.att_default =
47     D_required
48   | D_implied
49   | D_default of string
50   | D_fixed of string
51 type att_value = Pxp_types.att_value =
52     Value of string
53   | Valuelist of string list
54   | Implied_value
55
56 class collect_warnings :
57   object 
58     method warn : string -> unit
59     method print_warnings : string
60     method reset : unit
61   end
62 ;;
63
64
65 exception Illegal_character of int
66 exception Validation_error of string
67 exception WF_error of string
68 exception Character_not_supported
69 exception Bad_character_stream
70 exception At of (string * exn)
71 exception Undeclared
72
73 val string_of_exn : exn -> string
74   (* Converts a Markup exception into a readable string *)
75
76
77 type output_stream = Pxp_types.output_stream =
78     Out_buffer of Buffer.t
79   | Out_channel of out_channel
80   | Out_function of (string -> int -> int -> unit)
81
82 val write : output_stream -> string -> int -> int -> unit
83   (* write os s pos len: Writes the string to the buffer/channel/stream *)
84
85 (* ======================================================================
86  * History:
87  * 
88  * $Log$
89  * Revision 1.1  2000/11/17 09:57:30  lpadovan
90  * Initial revision
91  *
92  * Revision 1.2  2000/07/08 17:40:50  gerd
93  *      Updated the simulation.
94  *
95  * Revision 1.1  2000/05/29 23:43:51  gerd
96  *      Initial compatibility revision.
97  *
98  * ======================================================================
99  * OLD LOGS:
100  *
101  * Revision 1.7  2000/05/29 21:14:57  gerd
102  *      Changed the type 'encoding' into a polymorphic variant.
103  *
104  * Revision 1.6  2000/05/20 20:31:40  gerd
105  *      Big change: Added support for various encodings of the
106  * internal representation.
107  *
108  * Revision 1.5  2000/05/01 20:43:25  gerd
109  *         New type output_stream; new function 'write'.
110  *
111  * Revision 1.4  1999/09/01 16:25:35  gerd
112  *      Dropped Illegal_token and Content_not_allowed_here. WF_error can
113  * be used instead.
114  *
115  * Revision 1.3  1999/08/15 02:22:40  gerd
116  *         Added exception Undeclared.
117  *
118  * Revision 1.2  1999/08/14 22:15:17  gerd
119  *         New class "collect_warnings".
120  *
121  * Revision 1.1  1999/08/10 00:35:52  gerd
122  *      Initial revision.
123  *
124  * 
125  *)