]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/pxp/pxp/compatibility/markup_types.ml
Initial revision
[helm.git] / helm / DEVEL / pxp / pxp / compatibility / markup_types.ml
1 (* $Id$
2  * ----------------------------------------------------------------------
3  *)
4
5
6 type ext_id = Pxp_types.ext_id =
7     System of string
8   | Public of (string * string)
9   | Anonymous
10 type dtd_id = Pxp_types.dtd_id=
11     External of ext_id
12   | Derived of ext_id
13   | Internal
14 type content_model_type = Pxp_types.content_model_type =
15     Unspecified
16   | Empty
17   | Any
18   | Mixed of mixed_spec list
19   | Regexp of regexp_spec
20 and mixed_spec = Pxp_types.mixed_spec =
21     MPCDATA
22   | MChild of string
23 and regexp_spec = Pxp_types.regexp_spec =
24     Optional of regexp_spec
25   | Repeated of regexp_spec
26   | Repeated1 of regexp_spec
27   | Alt of regexp_spec list
28   | Seq of regexp_spec list
29   | Child of string
30 type att_type = Pxp_types.att_type =
31     A_cdata
32   | A_id
33   | A_idref
34   | A_idrefs
35   | A_entity
36   | A_entities
37   | A_nmtoken
38   | A_nmtokens
39   | A_notation of string list
40   | A_enum of string list
41 type att_default = Pxp_types.att_default =
42     D_required
43   | D_implied
44   | D_default of string
45   | D_fixed of string
46 type att_value = Pxp_types.att_value =
47     Value of string
48   | Valuelist of string list
49   | Implied_value
50
51 class collect_warnings = 
52 object
53   val mutable w = Buffer.create 100
54   method print_warnings =
55     Buffer.contents w
56   method reset =
57     Buffer.clear w
58   method warn s =
59     Buffer.add_string w ("WARNING: " ^ s ^ "\n")
60 end
61
62 exception Illegal_character of int
63 exception Validation_error = Pxp_types.Validation_error
64 exception WF_error = Pxp_types.WF_error
65 exception Character_not_supported = Pxp_types.Character_not_supported
66 exception Bad_character_stream = Netconversion.Malformed_code
67 exception At = Pxp_types.At
68 exception Undeclared = Pxp_types.Undeclared
69
70 let string_of_exn = Pxp_types.string_of_exn
71
72 type output_stream = Pxp_types.output_stream =
73     Out_buffer of Buffer.t
74   | Out_channel of out_channel
75   | Out_function of (string -> int -> int -> unit)
76
77 let write = Pxp_types.write
78
79
80 (* ======================================================================
81  * History:
82  * 
83  * $Log$
84  * Revision 1.1  2000/11/17 09:57:30  lpadovan
85  * Initial revision
86  *
87  * Revision 1.5  2000/08/18 20:19:16  gerd
88  *      Updates in the emulation because of PXP changes.
89  *
90  * Revision 1.4  2000/07/16 18:30:15  gerd
91  *      Updated because PXP does no longer have the exception
92  * Illegal_character.
93  *
94  * Revision 1.3  2000/07/14 21:35:35  gerd
95  *      Updated because of the simplification of Pxp_types.collect_warnings.
96  *
97  * Revision 1.2  2000/07/08 17:40:50  gerd
98  *      Updated the simulation.
99  *
100  * Revision 1.1  2000/05/29 23:43:51  gerd
101  *      Initial compatibility revision.
102  *
103  *)