~ubuntu-branches/ubuntu/oneiric/ocsigen/oneiric

« back to all changes in this revision

Viewing changes to xmlp4/oldocaml/xhtmltypes.ml

  • Committer: Bazaar Package Importer
  • Author(s): Stephane Glondu
  • Date: 2009-07-02 10:02:08 UTC
  • mfrom: (1.1.9 upstream) (4.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090702100208-n158b1sqwzn0asil
Tags: 1.2.0-2
Fix build on non-native architectures

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
(* Ocsigen
2
 
 * Copyright (C) 2005 Vincent Balat
3
 
 * Laboratoire PPS - CNRS Universit� Paris Diderot
4
 
 *
5
 
 * This program is free software; you can redistribute it and/or modify
6
 
 * it under the terms of the GNU Lesser General Public License as published by
7
 
 * the Free Software Foundation, with linking exception;
8
 
 * either version 2.1 of the License, or (at your option) any later version.
9
 
 *
10
 
 * This program is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 * GNU Lesser General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU Lesser General Public License
16
 
 * along with this program; if not, write to the Free Software
17
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
 
 *)
19
 
 
20
 
 
21
 
(** XHTML types with variants. (See also {!XHTML.M}) *)
22
 
 
23
 
(* I use these types to constraint typing with the syntax extension *)
24
 
 
25
 
(*
26
 
type tag = [ `Br | `Span | `Bdo | `Map | `Object | `Img | `Tt | `I | `B | `Big
27
 
           | `Small | `Em | `Strong | `Dfn | `Code | `Q | `Samp | `Kbd | `Var
28
 
           | `Cite | `Abbr | `Acronym | `Sub | `Sup | `Input | `Select
29
 
           | `Textarea | `Label | `Button | `Ins | `Del | `Script | `Noscript
30
 
           | `A | `H1 | `H2 | `H3 | `H4 | `H5 | `H6 | `Ul | `Ol | `Dl | `Pre
31
 
           | `Hr | `Blockquote | `Address | `P | `Div | `Fieldset | `Table
32
 
           | `Form | `Html | `Head | `Body | `Title | `Base | `Style | `Meta
33
 
           | `Link | `Li | `Dt | `Dd | `Param | `Area | `Optgroup | `Option
34
 
           | `Legend | `Caption | `Thead | `Tfoot | `Tbody | `Colgroup
35
 
           | `Col | `Tr | `Th | `Td]
36
 
*)
37
 
 
38
 
open XHTML.M
39
 
 
40
 
type xhtml = [ `Html ]
41
 
type form = [ `Form ]
42
 
type a = [ `A ]
43
 
type img = [ `Img ]
44
 
type link = [ `Link ]
45
 
type script = [ `Script ]
46
 
type input = [ `Input ]
47
 
type textarea = [ `Textarea ]
48
 
type select = [ `Select ]
49
 
type selectoption = [ `Option ]
50
 
type optgroup = [ `Optgroup ]
51
 
type button = [ `Button ]
52
 
 
53
 
type pcdata = [ `PCDATA ]
54
 
 
55
 
type notag
56
 
 
57
 
type html_content = [ `Body | `Head | `Frameset ]
58
 
 
59
 
type body_content = block
60
 
 
61
 
(* [ `Address | `Blockquote | `Del | `Div | `Dl | `Fieldset
62
 
| `Form | `H1 | `H2 | `H3 | `H4 | `H5 | `H6 | `Hr | `Ins | `Noscript | `Ol
63
 
| `P | `Pre | `Script | `Table | `Ul ] *)
64
 
 
65
 
type div_content = [ `PCDATA | flow ]
66
 
(* [ `A | `Abbr | `Acronym | `Address | `B | `Bdo | `Big | `Blockquote | `Br | `Button | `Cite | `Code | `Del | `Dfn | `Div | `Dl | `Em | `Fieldset | `Form | `H1 | `H2 | `H3 | `H4 | `H5 | `H6 | `Hr | `I | `Img | `Input | `Ins | `Kbd | `Label | `Map | `Noscript | `Object | `Ol | `P | `PCDATA | `Pre | `Q | `Samp | `Script | `Select | `Small | `Span | `Strong | `Sub | `Sup | `Table | `Textarea | `Tt | `Ul | `Var ] *)
67
 
 
68
 
type object_content = [ `PCDATA | flow | `Param ]
69
 
(* [ `A | `Abbr | `Acronym | `Address | `B | `Bdo | `Big | `Blockquote | `Br | `Button | `Cite | `Code | `Del | `Dfn | `Div | `Dl | `Em | `Fieldset | `Form | `H1 | `H2 | `H3 | `H4 | `H5 | `H6 | `Hr | `I | `Img | `Input | `Ins | `Kbd | `Label | `Map | `Noscript | `Object | `Ol | `P | `Param | `PCDATA | `Pre | `Q | `Samp | `Script | `Select | `Small | `Span | `Strong | `Sub | `Sup | `Table | `Textarea | `Tt | `Ul | `Var ] *)
70
 
 
71
 
type fieldset_content = [ `PCDATA | `Legend | flow ]
72
 
(* [ `A | `Abbr | `Acronym | `Address | `B | `Bdo | `Big | `Blockquote | `Br | `Button | `Cite | `Code | `Del | `Dfn | `Div | `Dl | `Em | `Fieldset | `Form | `H1 | `H2 | `H3 | `H4 | `H5 | `H6 | `Hr | `I | `Img | `Input | `Ins | `Kbd | `Label | `Legend | `Map | `Noscript | `Object | `Ol | `P | `PCDATA | `Pre | `Q | `Samp | `Script | `Select | `Small | `Span | `Strong | `Sub | `Sup | `Table | `Textarea | `Tt | `Ul | `Var ] *)
73
 
 
74
 
type button_content = [ `PCDATA | buttoncontent ]
75
 
(* [ `Abbr | `Acronym | `Address | `B | `Bdo | `Big | `Blockquote | `Br | `Cite | `Code | `Del | `Dfn | `Div | `Dl | `Em | `H1 | `H2 | `H3 | `H4 | `H5 | `H6 | `Hr | `I | `Img | `Ins | `Kbd | `Map | `Noscript | `Object | `Ol | `P | `PCDATA | `Pre | `Q | `Samp | `Script | `Small | `Span | `Strong | `Sub | `Sup | `Table | `Tt | `Ul | `Var ] *)
76
 
 
77
 
type head_content = [ `Base | `Link | `Object | `Script | `Style | `Title | `Meta ]
78
 
(* [ `Base | `Link | `Object | `Script | `Style | `Title | `Meta ] *)
79
 
 
80
 
type form_content = [ block_sans_form | `Fieldset ]
81
 
(* [ `Address | `Blockquote | `Del | `Div | `Dl | `Fieldset | `H1 | `H2 | `H3 | `H4 | `H5 | `H6 | `Hr | `Ins | `Noscript | `Ol | `P | `Pre | `Script | `Table | `Ul ] *)
82
 
 
83
 
type blockquote_content = [ `PCDATA | block ]
84
 
(* [ `Address | `Blockquote | `Del | `Div | `Dl | `Fieldset | `Form | `H1 | `H2 | `H3 | `H4 | `H5 | `H6 | `Hr | `Ins | `Noscript | `Ol | `P | `Pre | `Script | `Table  | `Ul ] *)
85
 
 
86
 
type map_content = [ block | `Area ]
87
 
(* [ `Address | `Area | `Blockquote | `Del | `Div | `Dl | `Fieldset | `Form | `H1 | `H2 | `H3 | `H4 | `H5 | `H6 | `Hr | `Ins | `Noscript | `Ol | `P | `Pre | `Script | `Table | `Ul ] *)
88
 
 
89
 
(* type inline_content =
90
 
    [ `A | `Abbr | `Acronym | `B | `Bdo | `Big | `Br | `Button | `Cite | `Code | `Del | `Dfn | `Em | `I | `Img | `Input | `Ins | `Kbd | `Label | `Map | `Object | `PCDATA | `Q | `Samp | `Script | `Select | `Small | `Span | `Strong | `Sub | `Sup | `Textarea | `Tt | `Var ]
91
 
*)
92
 
 
93
 
type inlinemix = [ `PCDATA | inline ]
94
 
(* [ `A | `Abbr | `Acronym | `B | `Bdo | `Big | `Br | `Button | `Cite | `Code | `Del | `Dfn | `Em | `I | `Img | `Input | `Ins | `Kbd | `Label | `Map | `Object | `PCDATA | `Q | `Samp | `Script | `Select | `Small | `Span | `Strong | `Sub | `Sup | `Textarea | `Tt | `Var ] *)
95
 
 
96
 
type label_content = [ `PCDATA | inline_sans_label ]
97
 
(* [ `A | `Abbr | `Acronym | `B | `Bdo | `Big | `Br | `Button | `Cite | `Code | `Del | `Dfn | `Em | `I | `Img | `Input | `Ins | `Kbd | `Map | `Object | `PCDATA | `Q | `Samp | `Script | `Select | `Small | `Span | `Strong | `Sub | `Sup | `Textarea | `Tt | `Var | `Noscript ] *)
98
 
 
99
 
type a_content = [ `PCDATA | inline_sans_a_mix ]
100
 
(* [ `Abbr | `Acronym | `B | `Bdo | `Big | `Br | `Button | `Cite | `Code | `Del | `Dfn | `Em | `I | `Img | `Input | `Ins | `Kbd | `Label | `Map | `Object | `PCDATA | `Q | `Samp | `Script | `Select | `Small | `Span | `Strong | `Sub | `Sup | `Textarea | `Tt | `Var | `Noscript ] *)
101
 
 
102
 
type pre_content = [ `PCDATA | precontent ]
103
 
(* [ `A | `Abbr | `Acronym | `B | `Bdo | `Br | `Cite | `Code | `Dfn | `Em | `I | `Kbd | `Map | `PCDATA | `Q | `Samp | `Script | `Span | `Strong | `Tt | `Var ] *)
104
 
 
105
 
type dl_content = [ `Dd | `Dt ]
106
 
 
107
 
type optgroup_content = [ `Option ]
108
 
 
109
 
type colgroup_content = [ `Col ]
110
 
 
111
 
type ul_content = [ `Li ]
112
 
 
113
 
type select_content = [ `Optgroup | `Option ]
114
 
 
115
 
type tbody_content = [ `Tr ]
116
 
 
117
 
type table_content =
118
 
    [ `Caption | `Col | `Colgroup | `Tbody | `Tfoot | `Thead | `Tr ]
119
 
 
120
 
type tr_content = [ `Td | `Th ]
121
 
 
122
 
type abbr_content = inlinemix
123
 
type acronym_content = inlinemix
124
 
type address_content = inlinemix
125
 
type b_content = inlinemix
126
 
type bdo_content = inlinemix
127
 
type big_content = inlinemix
128
 
type caption_content = inlinemix
129
 
type cite_content = inlinemix
130
 
type code_content = inlinemix
131
 
type dfn_content = inlinemix
132
 
type dt_content = inlinemix
133
 
type em_content = inlinemix
134
 
type h1_content = inlinemix
135
 
type h2_content = inlinemix
136
 
type h3_content = inlinemix
137
 
type h4_content = inlinemix
138
 
type h5_content = inlinemix
139
 
type h6_content = inlinemix
140
 
type i_content = inlinemix
141
 
type kbd_content = inlinemix
142
 
type legend_content = inlinemix
143
 
type p_content = inlinemix
144
 
type q_content = inlinemix
145
 
type samp_content = inlinemix
146
 
type small_content = inlinemix
147
 
type span_content = inlinemix
148
 
type strong_content = inlinemix
149
 
type sub_content = inlinemix
150
 
type sup_content = inlinemix
151
 
type tt_content = inlinemix
152
 
type var_content = inlinemix
153
 
 
154
 
type dd_content = div_content
155
 
type del_content = div_content
156
 
(* type div_content = div_content *)
157
 
type ins_content = div_content
158
 
type li_content = div_content
159
 
type th_content = div_content
160
 
type td_content = div_content
161
 
 
162
 
(* type tbody_content = body_content *)
163
 
type noscript_content = body_content
164
 
 
165
 
type area_content = notag
166
 
type base_content = notag
167
 
type br_content = notag
168
 
type col_content = notag
169
 
type hr_content = notag
170
 
type img_content = notag
171
 
type input_content = notag
172
 
type meta_content = notag
173
 
type param_content = notag
174
 
 
175
 
 
176
 
(*
177
 
type object_content = object_content
178
 
type fieldset_content = fieldset_content
179
 
type head_content = head_content
180
 
type form_content = form_content
181
 
type map_content = map_content
182
 
type label_content = label_content
183
 
type a_content = a_content
184
 
type pre_content = pre_content
185
 
type dl_content = dl_content
186
 
type optgroup_content = optgroup_content
187
 
type colgroup_content = colgroup_content
188
 
type ul_content = ul_content
189
 
type select_content = select_content
190
 
type table_content = table_content
191
 
type tr_content = tr_content
192
 
type button_content = button_content
193
 
type blockquote_content = blockquote_content
194
 
*)
195
 
 
196
 
type link_content = pcdata
197
 
type option_content = pcdata
198
 
type script_content = pcdata
199
 
type style_content = pcdata
200
 
type textarea_content = pcdata
201
 
type title_content = pcdata
202
 
 
203
 
type ol_content = ul_content
204
 
type thead_content = tbody_content
205
 
type tfoot_content = tbody_content
206
 
 
207
 
type a_attrib =
208
 
  [ common | `Accesskey | `Charset | `Href | `Hreflang
209
 
| `Name_01_00 | `Rel | `Rev | `Tabindex | `Target | `Type
210
 
| `Shape | `Coords ]
211
 
type link_attrib =
212
 
    [ common | `Charset | `Href | `Hreflang | `Media
213
 
  | `Rel | `Rev | `Target | `Type ]
214
 
type script_attrib = [ `XMLns | `Charset | `Src | `Defer | `XML_space ]
215
 
type form_attrib = [ common | `Enctype | `Method | `Name_01_00 | `Target | `Accept_charset | `Accept ]
216
 
type img_attrib =
217
 
    [ common | `Height | `Longdesc | `Name_01_00 | `Width | `Usemap ]
218
 
type div_attrib = common
219
 
type input_attrib =
220
 
    [ common | `Accesskey | `Checked | `Maxlength | `Name | `Size
221
 
    | `Src | `Tabindex | `Input_Type | `Value | `Disabled | `Readonly | 
222
 
          `Alt | `Accept | `Usemap ]
223
 
type textarea_attrib = [ common | `Accesskey | `Name | `Tabindex | `Disabled | `Readonly ]
224
 
type select_attrib =
225
 
  [ common | `Multiple | `Name | `Size | `Tabindex | `Disabled ]
226
 
type optgroup_attrib = [ common | `Disabled | `Label ]
227
 
type option_attrib = [ common | `Selected | `Value | `Disabled | `Label ]
228
 
type button_attrib = [ common | `Name | `Value | `Button_Type ]
229
 
type fieldset_attrib = common
230
 
type label_attrib = [ common | `Accesskey | `For ]
231
 
type legend_attrib = [ common | `Accesskey ]
232