nokogiri 1.18.0.rc1-aarch64-linux-musl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (203) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +38 -0
  3. data/LICENSE-DEPENDENCIES.md +2224 -0
  4. data/LICENSE.md +9 -0
  5. data/README.md +293 -0
  6. data/bin/nokogiri +131 -0
  7. data/dependencies.yml +42 -0
  8. data/ext/nokogiri/depend +38 -0
  9. data/ext/nokogiri/extconf.rb +1173 -0
  10. data/ext/nokogiri/gumbo.c +610 -0
  11. data/ext/nokogiri/html4_document.c +171 -0
  12. data/ext/nokogiri/html4_element_description.c +299 -0
  13. data/ext/nokogiri/html4_entity_lookup.c +37 -0
  14. data/ext/nokogiri/html4_sax_parser.c +40 -0
  15. data/ext/nokogiri/html4_sax_parser_context.c +98 -0
  16. data/ext/nokogiri/html4_sax_push_parser.c +96 -0
  17. data/ext/nokogiri/include/libexslt/exslt.h +108 -0
  18. data/ext/nokogiri/include/libexslt/exsltconfig.h +70 -0
  19. data/ext/nokogiri/include/libexslt/exsltexports.h +63 -0
  20. data/ext/nokogiri/include/libxml2/libxml/HTMLparser.h +336 -0
  21. data/ext/nokogiri/include/libxml2/libxml/HTMLtree.h +147 -0
  22. data/ext/nokogiri/include/libxml2/libxml/SAX.h +202 -0
  23. data/ext/nokogiri/include/libxml2/libxml/SAX2.h +171 -0
  24. data/ext/nokogiri/include/libxml2/libxml/c14n.h +115 -0
  25. data/ext/nokogiri/include/libxml2/libxml/catalog.h +182 -0
  26. data/ext/nokogiri/include/libxml2/libxml/chvalid.h +230 -0
  27. data/ext/nokogiri/include/libxml2/libxml/debugXML.h +217 -0
  28. data/ext/nokogiri/include/libxml2/libxml/dict.h +82 -0
  29. data/ext/nokogiri/include/libxml2/libxml/encoding.h +244 -0
  30. data/ext/nokogiri/include/libxml2/libxml/entities.h +166 -0
  31. data/ext/nokogiri/include/libxml2/libxml/globals.h +41 -0
  32. data/ext/nokogiri/include/libxml2/libxml/hash.h +251 -0
  33. data/ext/nokogiri/include/libxml2/libxml/list.h +137 -0
  34. data/ext/nokogiri/include/libxml2/libxml/nanoftp.h +186 -0
  35. data/ext/nokogiri/include/libxml2/libxml/nanohttp.h +98 -0
  36. data/ext/nokogiri/include/libxml2/libxml/parser.h +1390 -0
  37. data/ext/nokogiri/include/libxml2/libxml/parserInternals.h +671 -0
  38. data/ext/nokogiri/include/libxml2/libxml/pattern.h +106 -0
  39. data/ext/nokogiri/include/libxml2/libxml/relaxng.h +219 -0
  40. data/ext/nokogiri/include/libxml2/libxml/schemasInternals.h +959 -0
  41. data/ext/nokogiri/include/libxml2/libxml/schematron.h +143 -0
  42. data/ext/nokogiri/include/libxml2/libxml/threads.h +87 -0
  43. data/ext/nokogiri/include/libxml2/libxml/tree.h +1382 -0
  44. data/ext/nokogiri/include/libxml2/libxml/uri.h +106 -0
  45. data/ext/nokogiri/include/libxml2/libxml/valid.h +477 -0
  46. data/ext/nokogiri/include/libxml2/libxml/xinclude.h +136 -0
  47. data/ext/nokogiri/include/libxml2/libxml/xlink.h +189 -0
  48. data/ext/nokogiri/include/libxml2/libxml/xmlIO.h +438 -0
  49. data/ext/nokogiri/include/libxml2/libxml/xmlautomata.h +146 -0
  50. data/ext/nokogiri/include/libxml2/libxml/xmlerror.h +962 -0
  51. data/ext/nokogiri/include/libxml2/libxml/xmlexports.h +146 -0
  52. data/ext/nokogiri/include/libxml2/libxml/xmlmemory.h +188 -0
  53. data/ext/nokogiri/include/libxml2/libxml/xmlmodule.h +57 -0
  54. data/ext/nokogiri/include/libxml2/libxml/xmlreader.h +436 -0
  55. data/ext/nokogiri/include/libxml2/libxml/xmlregexp.h +215 -0
  56. data/ext/nokogiri/include/libxml2/libxml/xmlsave.h +102 -0
  57. data/ext/nokogiri/include/libxml2/libxml/xmlschemas.h +249 -0
  58. data/ext/nokogiri/include/libxml2/libxml/xmlschemastypes.h +152 -0
  59. data/ext/nokogiri/include/libxml2/libxml/xmlstring.h +140 -0
  60. data/ext/nokogiri/include/libxml2/libxml/xmlunicode.h +366 -0
  61. data/ext/nokogiri/include/libxml2/libxml/xmlversion.h +347 -0
  62. data/ext/nokogiri/include/libxml2/libxml/xmlwriter.h +489 -0
  63. data/ext/nokogiri/include/libxml2/libxml/xpath.h +579 -0
  64. data/ext/nokogiri/include/libxml2/libxml/xpathInternals.h +633 -0
  65. data/ext/nokogiri/include/libxml2/libxml/xpointer.h +138 -0
  66. data/ext/nokogiri/include/libxslt/attributes.h +39 -0
  67. data/ext/nokogiri/include/libxslt/documents.h +93 -0
  68. data/ext/nokogiri/include/libxslt/extensions.h +262 -0
  69. data/ext/nokogiri/include/libxslt/extra.h +72 -0
  70. data/ext/nokogiri/include/libxslt/functions.h +78 -0
  71. data/ext/nokogiri/include/libxslt/imports.h +75 -0
  72. data/ext/nokogiri/include/libxslt/keys.h +53 -0
  73. data/ext/nokogiri/include/libxslt/namespaces.h +68 -0
  74. data/ext/nokogiri/include/libxslt/numbersInternals.h +73 -0
  75. data/ext/nokogiri/include/libxslt/pattern.h +84 -0
  76. data/ext/nokogiri/include/libxslt/preproc.h +43 -0
  77. data/ext/nokogiri/include/libxslt/security.h +104 -0
  78. data/ext/nokogiri/include/libxslt/templates.h +77 -0
  79. data/ext/nokogiri/include/libxslt/transform.h +207 -0
  80. data/ext/nokogiri/include/libxslt/variables.h +118 -0
  81. data/ext/nokogiri/include/libxslt/xslt.h +110 -0
  82. data/ext/nokogiri/include/libxslt/xsltInternals.h +1995 -0
  83. data/ext/nokogiri/include/libxslt/xsltconfig.h +146 -0
  84. data/ext/nokogiri/include/libxslt/xsltexports.h +64 -0
  85. data/ext/nokogiri/include/libxslt/xsltlocale.h +44 -0
  86. data/ext/nokogiri/include/libxslt/xsltutils.h +343 -0
  87. data/ext/nokogiri/libxml2_polyfill.c +114 -0
  88. data/ext/nokogiri/nokogiri.c +294 -0
  89. data/ext/nokogiri/nokogiri.h +238 -0
  90. data/ext/nokogiri/test_global_handlers.c +40 -0
  91. data/ext/nokogiri/xml_attr.c +103 -0
  92. data/ext/nokogiri/xml_attribute_decl.c +70 -0
  93. data/ext/nokogiri/xml_cdata.c +62 -0
  94. data/ext/nokogiri/xml_comment.c +57 -0
  95. data/ext/nokogiri/xml_document.c +784 -0
  96. data/ext/nokogiri/xml_document_fragment.c +29 -0
  97. data/ext/nokogiri/xml_dtd.c +208 -0
  98. data/ext/nokogiri/xml_element_content.c +131 -0
  99. data/ext/nokogiri/xml_element_decl.c +69 -0
  100. data/ext/nokogiri/xml_encoding_handler.c +112 -0
  101. data/ext/nokogiri/xml_entity_decl.c +112 -0
  102. data/ext/nokogiri/xml_entity_reference.c +50 -0
  103. data/ext/nokogiri/xml_namespace.c +181 -0
  104. data/ext/nokogiri/xml_node.c +2459 -0
  105. data/ext/nokogiri/xml_node_set.c +518 -0
  106. data/ext/nokogiri/xml_processing_instruction.c +54 -0
  107. data/ext/nokogiri/xml_reader.c +777 -0
  108. data/ext/nokogiri/xml_relax_ng.c +149 -0
  109. data/ext/nokogiri/xml_sax_parser.c +403 -0
  110. data/ext/nokogiri/xml_sax_parser_context.c +390 -0
  111. data/ext/nokogiri/xml_sax_push_parser.c +206 -0
  112. data/ext/nokogiri/xml_schema.c +226 -0
  113. data/ext/nokogiri/xml_syntax_error.c +93 -0
  114. data/ext/nokogiri/xml_text.c +59 -0
  115. data/ext/nokogiri/xml_xpath_context.c +502 -0
  116. data/ext/nokogiri/xslt_stylesheet.c +421 -0
  117. data/gumbo-parser/CHANGES.md +63 -0
  118. data/gumbo-parser/Makefile +129 -0
  119. data/gumbo-parser/THANKS +27 -0
  120. data/lib/nokogiri/3.1/nokogiri.so +0 -0
  121. data/lib/nokogiri/3.2/nokogiri.so +0 -0
  122. data/lib/nokogiri/3.3/nokogiri.so +0 -0
  123. data/lib/nokogiri/3.4/nokogiri.so +0 -0
  124. data/lib/nokogiri/class_resolver.rb +67 -0
  125. data/lib/nokogiri/css/node.rb +58 -0
  126. data/lib/nokogiri/css/parser.rb +772 -0
  127. data/lib/nokogiri/css/parser.y +277 -0
  128. data/lib/nokogiri/css/parser_extras.rb +36 -0
  129. data/lib/nokogiri/css/selector_cache.rb +38 -0
  130. data/lib/nokogiri/css/syntax_error.rb +9 -0
  131. data/lib/nokogiri/css/tokenizer.rb +155 -0
  132. data/lib/nokogiri/css/tokenizer.rex +57 -0
  133. data/lib/nokogiri/css/xpath_visitor.rb +375 -0
  134. data/lib/nokogiri/css.rb +132 -0
  135. data/lib/nokogiri/decorators/slop.rb +42 -0
  136. data/lib/nokogiri/encoding_handler.rb +57 -0
  137. data/lib/nokogiri/extension.rb +32 -0
  138. data/lib/nokogiri/gumbo.rb +15 -0
  139. data/lib/nokogiri/html.rb +48 -0
  140. data/lib/nokogiri/html4/builder.rb +37 -0
  141. data/lib/nokogiri/html4/document.rb +235 -0
  142. data/lib/nokogiri/html4/document_fragment.rb +166 -0
  143. data/lib/nokogiri/html4/element_description.rb +25 -0
  144. data/lib/nokogiri/html4/element_description_defaults.rb +2040 -0
  145. data/lib/nokogiri/html4/encoding_reader.rb +121 -0
  146. data/lib/nokogiri/html4/entity_lookup.rb +15 -0
  147. data/lib/nokogiri/html4/sax/parser.rb +48 -0
  148. data/lib/nokogiri/html4/sax/parser_context.rb +15 -0
  149. data/lib/nokogiri/html4/sax/push_parser.rb +37 -0
  150. data/lib/nokogiri/html4.rb +42 -0
  151. data/lib/nokogiri/html5/builder.rb +40 -0
  152. data/lib/nokogiri/html5/document.rb +199 -0
  153. data/lib/nokogiri/html5/document_fragment.rb +200 -0
  154. data/lib/nokogiri/html5/node.rb +103 -0
  155. data/lib/nokogiri/html5.rb +368 -0
  156. data/lib/nokogiri/jruby/dependencies.rb +3 -0
  157. data/lib/nokogiri/jruby/nokogiri_jars.rb +43 -0
  158. data/lib/nokogiri/syntax_error.rb +6 -0
  159. data/lib/nokogiri/version/constant.rb +6 -0
  160. data/lib/nokogiri/version/info.rb +224 -0
  161. data/lib/nokogiri/version.rb +4 -0
  162. data/lib/nokogiri/xml/attr.rb +66 -0
  163. data/lib/nokogiri/xml/attribute_decl.rb +22 -0
  164. data/lib/nokogiri/xml/builder.rb +494 -0
  165. data/lib/nokogiri/xml/cdata.rb +13 -0
  166. data/lib/nokogiri/xml/character_data.rb +9 -0
  167. data/lib/nokogiri/xml/document.rb +514 -0
  168. data/lib/nokogiri/xml/document_fragment.rb +276 -0
  169. data/lib/nokogiri/xml/dtd.rb +34 -0
  170. data/lib/nokogiri/xml/element_content.rb +46 -0
  171. data/lib/nokogiri/xml/element_decl.rb +17 -0
  172. data/lib/nokogiri/xml/entity_decl.rb +23 -0
  173. data/lib/nokogiri/xml/entity_reference.rb +20 -0
  174. data/lib/nokogiri/xml/namespace.rb +57 -0
  175. data/lib/nokogiri/xml/node/save_options.rb +76 -0
  176. data/lib/nokogiri/xml/node.rb +1650 -0
  177. data/lib/nokogiri/xml/node_set.rb +449 -0
  178. data/lib/nokogiri/xml/notation.rb +19 -0
  179. data/lib/nokogiri/xml/parse_options.rb +213 -0
  180. data/lib/nokogiri/xml/pp/character_data.rb +21 -0
  181. data/lib/nokogiri/xml/pp/node.rb +73 -0
  182. data/lib/nokogiri/xml/pp.rb +4 -0
  183. data/lib/nokogiri/xml/processing_instruction.rb +11 -0
  184. data/lib/nokogiri/xml/reader.rb +139 -0
  185. data/lib/nokogiri/xml/relax_ng.rb +75 -0
  186. data/lib/nokogiri/xml/sax/document.rb +258 -0
  187. data/lib/nokogiri/xml/sax/parser.rb +199 -0
  188. data/lib/nokogiri/xml/sax/parser_context.rb +129 -0
  189. data/lib/nokogiri/xml/sax/push_parser.rb +64 -0
  190. data/lib/nokogiri/xml/sax.rb +54 -0
  191. data/lib/nokogiri/xml/schema.rb +140 -0
  192. data/lib/nokogiri/xml/searchable.rb +297 -0
  193. data/lib/nokogiri/xml/syntax_error.rb +94 -0
  194. data/lib/nokogiri/xml/text.rb +11 -0
  195. data/lib/nokogiri/xml/xpath/syntax_error.rb +13 -0
  196. data/lib/nokogiri/xml/xpath.rb +21 -0
  197. data/lib/nokogiri/xml/xpath_context.rb +49 -0
  198. data/lib/nokogiri/xml.rb +65 -0
  199. data/lib/nokogiri/xslt/stylesheet.rb +49 -0
  200. data/lib/nokogiri/xslt.rb +129 -0
  201. data/lib/nokogiri.rb +128 -0
  202. data/lib/xsd/xmlparser/nokogiri.rb +105 -0
  203. metadata +324 -0
@@ -0,0 +1,2040 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nokogiri
4
+ module HTML4
5
+ class ElementDescription
6
+ # Methods are defined protected by method_defined? because at
7
+ # this point the C-library or Java library is already loaded,
8
+ # and we don't want to clobber any methods that have been
9
+ # defined there.
10
+
11
+ Desc = Struct.new(
12
+ "HTMLElementDescription",
13
+ :name,
14
+ :startTag,
15
+ :endTag,
16
+ :saveEndTag,
17
+ :empty,
18
+ :depr,
19
+ :dtd,
20
+ :isinline,
21
+ :desc,
22
+ :subelts,
23
+ :defaultsubelt,
24
+ :attrs_opt,
25
+ :attrs_depr,
26
+ :attrs_req,
27
+ )
28
+
29
+ # This is filled in down below.
30
+ DefaultDescriptions = {} # rubocop:disable Naming/ConstantName
31
+
32
+ def default_desc
33
+ DefaultDescriptions[name.downcase]
34
+ end
35
+ private :default_desc
36
+
37
+ unless method_defined?(:implied_start_tag?)
38
+ def implied_start_tag?
39
+ default_desc&.startTag
40
+ end
41
+ end
42
+
43
+ unless method_defined?(:implied_end_tag?)
44
+ def implied_end_tag?
45
+ default_desc&.endTag
46
+ end
47
+ end
48
+
49
+ unless method_defined?(:save_end_tag?)
50
+ def save_end_tag?
51
+ default_desc&.saveEndTag
52
+ end
53
+ end
54
+
55
+ unless method_defined?(:deprecated?)
56
+ def deprecated?
57
+ default_desc&.depr
58
+ end
59
+ end
60
+
61
+ unless method_defined?(:description)
62
+ def description
63
+ default_desc&.desc
64
+ end
65
+ end
66
+
67
+ unless method_defined?(:default_sub_element)
68
+ def default_sub_element
69
+ default_desc&.defaultsubelt
70
+ end
71
+ end
72
+
73
+ unless method_defined?(:optional_attributes)
74
+ def optional_attributes
75
+ d = default_desc
76
+ d ? d.attrs_opt : []
77
+ end
78
+ end
79
+
80
+ unless method_defined?(:deprecated_attributes)
81
+ def deprecated_attributes
82
+ d = default_desc
83
+ d ? d.attrs_depr : []
84
+ end
85
+ end
86
+
87
+ unless method_defined?(:required_attributes)
88
+ def required_attributes
89
+ d = default_desc
90
+ d ? d.attrs_req : []
91
+ end
92
+ end
93
+
94
+ ###
95
+ # Default Element Descriptions (HTML 4.0) copied from
96
+ # libxml2/HTMLparser.c and libxml2/include/libxml/HTMLparser.h
97
+ #
98
+ # The copyright notice for those files and the following list of
99
+ # element and attribute descriptions is reproduced here:
100
+ #
101
+ # Except where otherwise noted in the source code (e.g. the
102
+ # files hash.c, list.c and the trio files, which are covered by
103
+ # a similar licence but with different Copyright notices) all
104
+ # the files are:
105
+ #
106
+ # Copyright (C) 1998-2003 Daniel Veillard. All Rights Reserved.
107
+ #
108
+ # Permission is hereby granted, free of charge, to any person
109
+ # obtaining a copy of this software and associated documentation
110
+ # files (the "Software"), to deal in the Software without
111
+ # restriction, including without limitation the rights to use,
112
+ # copy, modify, merge, publish, distribute, sublicense, and/or
113
+ # sell copies of the Software, and to permit persons to whom the
114
+ # Software is fur- nished to do so, subject to the following
115
+ # conditions:
116
+
117
+ # The above copyright notice and this permission notice shall be
118
+ # included in all copies or substantial portions of the
119
+ # Software.
120
+
121
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
122
+ # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
123
+ # WARRANTIES OF MERCHANTABILITY, FIT- NESS FOR A PARTICULAR
124
+ # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE DANIEL
125
+ # VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
126
+ # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
127
+ # FROM, OUT OF OR IN CON- NECTION WITH THE SOFTWARE OR THE USE
128
+ # OR OTHER DEALINGS IN THE SOFTWARE.
129
+
130
+ # Except as contained in this notice, the name of Daniel
131
+ # Veillard shall not be used in advertising or otherwise to
132
+ # promote the sale, use or other deal- ings in this Software
133
+ # without prior written authorization from him.
134
+
135
+ # Attributes defined and categorized
136
+ FONTSTYLE = ["tt", "i", "b", "u", "s", "strike", "big", "small"]
137
+ PHRASE = [
138
+ "em",
139
+ "strong",
140
+ "dfn",
141
+ "code",
142
+ "samp",
143
+ "kbd",
144
+ "var",
145
+ "cite",
146
+ "abbr",
147
+ "acronym",
148
+ ]
149
+ SPECIAL = [
150
+ "a",
151
+ "img",
152
+ "applet",
153
+ "embed",
154
+ "object",
155
+ "font",
156
+ "basefont",
157
+ "br",
158
+ "script",
159
+ "map",
160
+ "q",
161
+ "sub",
162
+ "sup",
163
+ "span",
164
+ "bdo",
165
+ "iframe",
166
+ ]
167
+ PCDATA = []
168
+ HEADING = ["h1", "h2", "h3", "h4", "h5", "h6"]
169
+ LIST = ["ul", "ol", "dir", "menu"]
170
+ FORMCTRL = ["input", "select", "textarea", "label", "button"]
171
+ BLOCK = [
172
+ HEADING,
173
+ LIST,
174
+ "pre",
175
+ "p",
176
+ "dl",
177
+ "div",
178
+ "center",
179
+ "noscript",
180
+ "noframes",
181
+ "blockquote",
182
+ "form",
183
+ "isindex",
184
+ "hr",
185
+ "table",
186
+ "fieldset",
187
+ "address",
188
+ ]
189
+ INLINE = [PCDATA, FONTSTYLE, PHRASE, SPECIAL, FORMCTRL]
190
+ FLOW = [BLOCK, INLINE]
191
+ MODIFIER = []
192
+ EMPTY = []
193
+
194
+ HTML_FLOW = FLOW
195
+ HTML_INLINE = INLINE
196
+ HTML_PCDATA = PCDATA
197
+ HTML_CDATA = HTML_PCDATA
198
+
199
+ COREATTRS = ["id", "class", "style", "title"]
200
+ I18N = ["lang", "dir"]
201
+ EVENTS = [
202
+ "onclick",
203
+ "ondblclick",
204
+ "onmousedown",
205
+ "onmouseup",
206
+ "onmouseover",
207
+ "onmouseout",
208
+ "onkeypress",
209
+ "onkeydown",
210
+ "onkeyup",
211
+ ]
212
+ ATTRS = [COREATTRS, I18N, EVENTS]
213
+ CELLHALIGN = ["align", "char", "charoff"]
214
+ CELLVALIGN = ["valign"]
215
+
216
+ HTML_ATTRS = ATTRS
217
+ CORE_I18N_ATTRS = [COREATTRS, I18N]
218
+ CORE_ATTRS = COREATTRS
219
+ I18N_ATTRS = I18N
220
+
221
+ A_ATTRS = [
222
+ ATTRS,
223
+ "charset",
224
+ "type",
225
+ "name",
226
+ "href",
227
+ "hreflang",
228
+ "rel",
229
+ "rev",
230
+ "accesskey",
231
+ "shape",
232
+ "coords",
233
+ "tabindex",
234
+ "onfocus",
235
+ "onblur",
236
+ ]
237
+ TARGET_ATTR = ["target"]
238
+ ROWS_COLS_ATTR = ["rows", "cols"]
239
+ ALT_ATTR = ["alt"]
240
+ SRC_ALT_ATTRS = ["src", "alt"]
241
+ HREF_ATTRS = ["href"]
242
+ CLEAR_ATTRS = ["clear"]
243
+ INLINE_P = [INLINE, "p"]
244
+
245
+ FLOW_PARAM = [FLOW, "param"]
246
+ APPLET_ATTRS = [
247
+ COREATTRS,
248
+ "codebase",
249
+ "archive",
250
+ "alt",
251
+ "name",
252
+ "height",
253
+ "width",
254
+ "align",
255
+ "hspace",
256
+ "vspace",
257
+ ]
258
+ AREA_ATTRS = [
259
+ "shape",
260
+ "coords",
261
+ "href",
262
+ "nohref",
263
+ "tabindex",
264
+ "accesskey",
265
+ "onfocus",
266
+ "onblur",
267
+ ]
268
+ BASEFONT_ATTRS = ["id", "size", "color", "face"]
269
+ QUOTE_ATTRS = [ATTRS, "cite"]
270
+ BODY_CONTENTS = [FLOW, "ins", "del"]
271
+ BODY_ATTRS = [ATTRS, "onload", "onunload"]
272
+ BODY_DEPR = [
273
+ "background",
274
+ "bgcolor",
275
+ "text",
276
+ "link",
277
+ "vlink",
278
+ "alink",
279
+ ]
280
+ BUTTON_ATTRS = [
281
+ ATTRS,
282
+ "name",
283
+ "value",
284
+ "type",
285
+ "disabled",
286
+ "tabindex",
287
+ "accesskey",
288
+ "onfocus",
289
+ "onblur",
290
+ ]
291
+
292
+ COL_ATTRS = [ATTRS, "span", "width", CELLHALIGN, CELLVALIGN]
293
+ COL_ELT = ["col"]
294
+ EDIT_ATTRS = [ATTRS, "datetime", "cite"]
295
+ COMPACT_ATTRS = [ATTRS, "compact"]
296
+ DL_CONTENTS = ["dt", "dd"]
297
+ COMPACT_ATTR = ["compact"]
298
+ LABEL_ATTR = ["label"]
299
+ FIELDSET_CONTENTS = [FLOW, "legend"]
300
+ FONT_ATTRS = [COREATTRS, I18N, "size", "color", "face"]
301
+ FORM_CONTENTS = [
302
+ HEADING,
303
+ LIST,
304
+ INLINE,
305
+ "pre",
306
+ "p",
307
+ "div",
308
+ "center",
309
+ "noscript",
310
+ "noframes",
311
+ "blockquote",
312
+ "isindex",
313
+ "hr",
314
+ "table",
315
+ "fieldset",
316
+ "address",
317
+ ]
318
+ FORM_ATTRS = [
319
+ ATTRS,
320
+ "method",
321
+ "enctype",
322
+ "accept",
323
+ "name",
324
+ "onsubmit",
325
+ "onreset",
326
+ "accept-charset",
327
+ ]
328
+ FRAME_ATTRS = [
329
+ COREATTRS,
330
+ "longdesc",
331
+ "name",
332
+ "src",
333
+ "frameborder",
334
+ "marginwidth",
335
+ "marginheight",
336
+ "noresize",
337
+ "scrolling",
338
+ ]
339
+ FRAMESET_ATTRS = [COREATTRS, "rows", "cols", "onload", "onunload"]
340
+ FRAMESET_CONTENTS = ["frameset", "frame", "noframes"]
341
+ HEAD_ATTRS = [I18N, "profile"]
342
+ HEAD_CONTENTS = [
343
+ "title",
344
+ "isindex",
345
+ "base",
346
+ "script",
347
+ "style",
348
+ "meta",
349
+ "link",
350
+ "object",
351
+ ]
352
+ HR_DEPR = ["align", "noshade", "size", "width"]
353
+ VERSION_ATTR = ["version"]
354
+ HTML_CONTENT = ["head", "body", "frameset"]
355
+ IFRAME_ATTRS = [
356
+ COREATTRS,
357
+ "longdesc",
358
+ "name",
359
+ "src",
360
+ "frameborder",
361
+ "marginwidth",
362
+ "marginheight",
363
+ "scrolling",
364
+ "align",
365
+ "height",
366
+ "width",
367
+ ]
368
+ IMG_ATTRS = [
369
+ ATTRS,
370
+ "longdesc",
371
+ "name",
372
+ "height",
373
+ "width",
374
+ "usemap",
375
+ "ismap",
376
+ ]
377
+ EMBED_ATTRS = [
378
+ COREATTRS,
379
+ "align",
380
+ "alt",
381
+ "border",
382
+ "code",
383
+ "codebase",
384
+ "frameborder",
385
+ "height",
386
+ "hidden",
387
+ "hspace",
388
+ "name",
389
+ "palette",
390
+ "pluginspace",
391
+ "pluginurl",
392
+ "src",
393
+ "type",
394
+ "units",
395
+ "vspace",
396
+ "width",
397
+ ]
398
+ INPUT_ATTRS = [
399
+ ATTRS,
400
+ "type",
401
+ "name",
402
+ "value",
403
+ "checked",
404
+ "disabled",
405
+ "readonly",
406
+ "size",
407
+ "maxlength",
408
+ "src",
409
+ "alt",
410
+ "usemap",
411
+ "ismap",
412
+ "tabindex",
413
+ "accesskey",
414
+ "onfocus",
415
+ "onblur",
416
+ "onselect",
417
+ "onchange",
418
+ "accept",
419
+ ]
420
+ PROMPT_ATTRS = [COREATTRS, I18N, "prompt"]
421
+ LABEL_ATTRS = [ATTRS, "for", "accesskey", "onfocus", "onblur"]
422
+ LEGEND_ATTRS = [ATTRS, "accesskey"]
423
+ ALIGN_ATTR = ["align"]
424
+ LINK_ATTRS = [
425
+ ATTRS,
426
+ "charset",
427
+ "href",
428
+ "hreflang",
429
+ "type",
430
+ "rel",
431
+ "rev",
432
+ "media",
433
+ ]
434
+ MAP_CONTENTS = [BLOCK, "area"]
435
+ NAME_ATTR = ["name"]
436
+ ACTION_ATTR = ["action"]
437
+ BLOCKLI_ELT = [BLOCK, "li"]
438
+ META_ATTRS = [I18N, "http-equiv", "name", "scheme"]
439
+ CONTENT_ATTR = ["content"]
440
+ TYPE_ATTR = ["type"]
441
+ NOFRAMES_CONTENT = ["body", FLOW, MODIFIER]
442
+ OBJECT_CONTENTS = [FLOW, "param"]
443
+ OBJECT_ATTRS = [
444
+ ATTRS,
445
+ "declare",
446
+ "classid",
447
+ "codebase",
448
+ "data",
449
+ "type",
450
+ "codetype",
451
+ "archive",
452
+ "standby",
453
+ "height",
454
+ "width",
455
+ "usemap",
456
+ "name",
457
+ "tabindex",
458
+ ]
459
+ OBJECT_DEPR = ["align", "border", "hspace", "vspace"]
460
+ OL_ATTRS = ["type", "compact", "start"]
461
+ OPTION_ELT = ["option"]
462
+ OPTGROUP_ATTRS = [ATTRS, "disabled"]
463
+ OPTION_ATTRS = [ATTRS, "disabled", "label", "selected", "value"]
464
+ PARAM_ATTRS = ["id", "value", "valuetype", "type"]
465
+ WIDTH_ATTR = ["width"]
466
+ PRE_CONTENT = [
467
+ PHRASE,
468
+ "tt",
469
+ "i",
470
+ "b",
471
+ "u",
472
+ "s",
473
+ "strike",
474
+ "a",
475
+ "br",
476
+ "script",
477
+ "map",
478
+ "q",
479
+ "span",
480
+ "bdo",
481
+ "iframe",
482
+ ]
483
+ SCRIPT_ATTRS = ["charset", "src", "defer", "event", "for"]
484
+ LANGUAGE_ATTR = ["language"]
485
+ SELECT_CONTENT = ["optgroup", "option"]
486
+ SELECT_ATTRS = [
487
+ ATTRS,
488
+ "name",
489
+ "size",
490
+ "multiple",
491
+ "disabled",
492
+ "tabindex",
493
+ "onfocus",
494
+ "onblur",
495
+ "onchange",
496
+ ]
497
+ STYLE_ATTRS = [I18N, "media", "title"]
498
+ TABLE_ATTRS = [
499
+ ATTRS,
500
+ "summary",
501
+ "width",
502
+ "border",
503
+ "frame",
504
+ "rules",
505
+ "cellspacing",
506
+ "cellpadding",
507
+ "datapagesize",
508
+ ]
509
+ TABLE_DEPR = ["align", "bgcolor"]
510
+ TABLE_CONTENTS = [
511
+ "caption",
512
+ "col",
513
+ "colgroup",
514
+ "thead",
515
+ "tfoot",
516
+ "tbody",
517
+ "tr",
518
+ ]
519
+ TR_ELT = ["tr"]
520
+ TALIGN_ATTRS = [ATTRS, CELLHALIGN, CELLVALIGN]
521
+ TH_TD_DEPR = ["nowrap", "bgcolor", "width", "height"]
522
+ TH_TD_ATTR = [
523
+ ATTRS,
524
+ "abbr",
525
+ "axis",
526
+ "headers",
527
+ "scope",
528
+ "rowspan",
529
+ "colspan",
530
+ CELLHALIGN,
531
+ CELLVALIGN,
532
+ ]
533
+ TEXTAREA_ATTRS = [
534
+ ATTRS,
535
+ "name",
536
+ "disabled",
537
+ "readonly",
538
+ "tabindex",
539
+ "accesskey",
540
+ "onfocus",
541
+ "onblur",
542
+ "onselect",
543
+ "onchange",
544
+ ]
545
+ TR_CONTENTS = ["th", "td"]
546
+ BGCOLOR_ATTR = ["bgcolor"]
547
+ LI_ELT = ["li"]
548
+ UL_DEPR = ["type", "compact"]
549
+ DIR_ATTR = ["dir"]
550
+
551
+ [
552
+ [
553
+ "a",
554
+ false,
555
+ false,
556
+ false,
557
+ false,
558
+ false,
559
+ :any,
560
+ true,
561
+ "anchor ",
562
+ HTML_INLINE,
563
+ nil,
564
+ A_ATTRS,
565
+ TARGET_ATTR,
566
+ [],
567
+ ],
568
+ [
569
+ "abbr",
570
+ false,
571
+ false,
572
+ false,
573
+ false,
574
+ false,
575
+ :any,
576
+ true,
577
+ "abbreviated form",
578
+ HTML_INLINE,
579
+ nil,
580
+ HTML_ATTRS,
581
+ [],
582
+ [],
583
+ ],
584
+ [
585
+ "acronym",
586
+ false,
587
+ false,
588
+ false,
589
+ false,
590
+ false,
591
+ :any,
592
+ true,
593
+ "",
594
+ HTML_INLINE,
595
+ nil,
596
+ HTML_ATTRS,
597
+ [],
598
+ [],
599
+ ],
600
+ [
601
+ "address",
602
+ false,
603
+ false,
604
+ false,
605
+ false,
606
+ false,
607
+ :any,
608
+ false,
609
+ "information on author",
610
+ INLINE_P,
611
+ nil,
612
+ HTML_ATTRS,
613
+ [],
614
+ [],
615
+ ],
616
+ [
617
+ "applet",
618
+ false,
619
+ false,
620
+ false,
621
+ false,
622
+ true,
623
+ :loose,
624
+ true,
625
+ "java applet ",
626
+ FLOW_PARAM,
627
+ nil,
628
+ [],
629
+ APPLET_ATTRS,
630
+ [],
631
+ ],
632
+ [
633
+ "area",
634
+ false,
635
+ true,
636
+ true,
637
+ true,
638
+ false,
639
+ :any,
640
+ false,
641
+ "client-side image map area ",
642
+ EMPTY,
643
+ nil,
644
+ AREA_ATTRS,
645
+ TARGET_ATTR,
646
+ ALT_ATTR,
647
+ ],
648
+ [
649
+ "b",
650
+ false,
651
+ true,
652
+ false,
653
+ false,
654
+ false,
655
+ :any,
656
+ true,
657
+ "bold text style",
658
+ HTML_INLINE,
659
+ nil,
660
+ HTML_ATTRS,
661
+ [],
662
+ [],
663
+ ],
664
+ [
665
+ "base",
666
+ false,
667
+ true,
668
+ true,
669
+ true,
670
+ false,
671
+ :any,
672
+ false,
673
+ "document base uri ",
674
+ EMPTY,
675
+ nil,
676
+ [],
677
+ TARGET_ATTR,
678
+ HREF_ATTRS,
679
+ ],
680
+ [
681
+ "basefont",
682
+ false,
683
+ true,
684
+ true,
685
+ true,
686
+ true,
687
+ :loose,
688
+ true,
689
+ "base font size ",
690
+ EMPTY,
691
+ nil,
692
+ [],
693
+ BASEFONT_ATTRS,
694
+ [],
695
+ ],
696
+ [
697
+ "bdo",
698
+ false,
699
+ false,
700
+ false,
701
+ false,
702
+ false,
703
+ :any,
704
+ true,
705
+ "i18n bidi over-ride ",
706
+ HTML_INLINE,
707
+ nil,
708
+ CORE_I18N_ATTRS,
709
+ [],
710
+ DIR_ATTR,
711
+ ],
712
+ [
713
+ "big",
714
+ false,
715
+ true,
716
+ false,
717
+ false,
718
+ false,
719
+ :any,
720
+ true,
721
+ "large text style",
722
+ HTML_INLINE,
723
+ nil,
724
+ HTML_ATTRS,
725
+ [],
726
+ [],
727
+ ],
728
+ [
729
+ "blockquote",
730
+ false,
731
+ false,
732
+ false,
733
+ false,
734
+ false,
735
+ :any,
736
+ false,
737
+ "long quotation ",
738
+ HTML_FLOW,
739
+ nil,
740
+ QUOTE_ATTRS,
741
+ [],
742
+ [],
743
+ ],
744
+ [
745
+ "body",
746
+ true,
747
+ true,
748
+ false,
749
+ false,
750
+ false,
751
+ :any,
752
+ false,
753
+ "document body ",
754
+ BODY_CONTENTS,
755
+ "div",
756
+ BODY_ATTRS,
757
+ BODY_DEPR,
758
+ [],
759
+ ],
760
+ [
761
+ "br",
762
+ false,
763
+ true,
764
+ true,
765
+ true,
766
+ false,
767
+ :any,
768
+ true,
769
+ "forced line break ",
770
+ EMPTY,
771
+ nil,
772
+ CORE_ATTRS,
773
+ CLEAR_ATTRS,
774
+ [],
775
+ ],
776
+ [
777
+ "button",
778
+ false,
779
+ false,
780
+ false,
781
+ false,
782
+ false,
783
+ :any,
784
+ true,
785
+ "push button ",
786
+ [HTML_FLOW, MODIFIER],
787
+ nil,
788
+ BUTTON_ATTRS,
789
+ [],
790
+ [],
791
+ ],
792
+ [
793
+ "caption",
794
+ false,
795
+ false,
796
+ false,
797
+ false,
798
+ false,
799
+ :any,
800
+ false,
801
+ "table caption ",
802
+ HTML_INLINE,
803
+ nil,
804
+ HTML_ATTRS,
805
+ [],
806
+ [],
807
+ ],
808
+ [
809
+ "center",
810
+ false,
811
+ true,
812
+ false,
813
+ false,
814
+ true,
815
+ :loose,
816
+ false,
817
+ "shorthand for div align=center ",
818
+ HTML_FLOW,
819
+ nil,
820
+ [],
821
+ HTML_ATTRS,
822
+ [],
823
+ ],
824
+ [
825
+ "cite",
826
+ false,
827
+ false,
828
+ false,
829
+ false,
830
+ false,
831
+ :any,
832
+ true,
833
+ "citation",
834
+ HTML_INLINE,
835
+ nil,
836
+ HTML_ATTRS,
837
+ [],
838
+ [],
839
+ ],
840
+ [
841
+ "code",
842
+ false,
843
+ false,
844
+ false,
845
+ false,
846
+ false,
847
+ :any,
848
+ true,
849
+ "computer code fragment",
850
+ HTML_INLINE,
851
+ nil,
852
+ HTML_ATTRS,
853
+ [],
854
+ [],
855
+ ],
856
+ [
857
+ "col",
858
+ false,
859
+ true,
860
+ true,
861
+ true,
862
+ false,
863
+ :any,
864
+ false,
865
+ "table column ",
866
+ EMPTY,
867
+ nil,
868
+ COL_ATTRS,
869
+ [],
870
+ [],
871
+ ],
872
+ [
873
+ "colgroup",
874
+ false,
875
+ true,
876
+ false,
877
+ false,
878
+ false,
879
+ :any,
880
+ false,
881
+ "table column group ",
882
+ COL_ELT,
883
+ "col",
884
+ COL_ATTRS,
885
+ [],
886
+ [],
887
+ ],
888
+ [
889
+ "dd",
890
+ false,
891
+ true,
892
+ false,
893
+ false,
894
+ false,
895
+ :any,
896
+ false,
897
+ "definition description ",
898
+ HTML_FLOW,
899
+ nil,
900
+ HTML_ATTRS,
901
+ [],
902
+ [],
903
+ ],
904
+ [
905
+ "del",
906
+ false,
907
+ false,
908
+ false,
909
+ false,
910
+ false,
911
+ :any,
912
+ true,
913
+ "deleted text ",
914
+ HTML_FLOW,
915
+ nil,
916
+ EDIT_ATTRS,
917
+ [],
918
+ [],
919
+ ],
920
+ [
921
+ "dfn",
922
+ false,
923
+ false,
924
+ false,
925
+ false,
926
+ false,
927
+ :any,
928
+ true,
929
+ "instance definition",
930
+ HTML_INLINE,
931
+ nil,
932
+ HTML_ATTRS,
933
+ [],
934
+ [],
935
+ ],
936
+ [
937
+ "dir",
938
+ false,
939
+ false,
940
+ false,
941
+ false,
942
+ true,
943
+ :loose,
944
+ false,
945
+ "directory list",
946
+ BLOCKLI_ELT,
947
+ "li",
948
+ [],
949
+ COMPACT_ATTRS,
950
+ [],
951
+ ],
952
+ [
953
+ "div",
954
+ false,
955
+ false,
956
+ false,
957
+ false,
958
+ false,
959
+ :any,
960
+ false,
961
+ "generic language/style container",
962
+ HTML_FLOW,
963
+ nil,
964
+ HTML_ATTRS,
965
+ ALIGN_ATTR,
966
+ [],
967
+ ],
968
+ [
969
+ "dl",
970
+ false,
971
+ false,
972
+ false,
973
+ false,
974
+ false,
975
+ :any,
976
+ false,
977
+ "definition list ",
978
+ DL_CONTENTS,
979
+ "dd",
980
+ HTML_ATTRS,
981
+ COMPACT_ATTR,
982
+ [],
983
+ ],
984
+ [
985
+ "dt",
986
+ false,
987
+ true,
988
+ false,
989
+ false,
990
+ false,
991
+ :any,
992
+ false,
993
+ "definition term ",
994
+ HTML_INLINE,
995
+ nil,
996
+ HTML_ATTRS,
997
+ [],
998
+ [],
999
+ ],
1000
+ [
1001
+ "em",
1002
+ false,
1003
+ true,
1004
+ false,
1005
+ false,
1006
+ false,
1007
+ :any,
1008
+ true,
1009
+ "emphasis",
1010
+ HTML_INLINE,
1011
+ nil,
1012
+ HTML_ATTRS,
1013
+ [],
1014
+ [],
1015
+ ],
1016
+ [
1017
+ "embed",
1018
+ false,
1019
+ true,
1020
+ false,
1021
+ false,
1022
+ true,
1023
+ :loose,
1024
+ true,
1025
+ "generic embedded object ",
1026
+ EMPTY,
1027
+ nil,
1028
+ EMBED_ATTRS,
1029
+ [],
1030
+ [],
1031
+ ],
1032
+ [
1033
+ "fieldset",
1034
+ false,
1035
+ false,
1036
+ false,
1037
+ false,
1038
+ false,
1039
+ :any,
1040
+ false,
1041
+ "form control group ",
1042
+ FIELDSET_CONTENTS,
1043
+ nil,
1044
+ HTML_ATTRS,
1045
+ [],
1046
+ [],
1047
+ ],
1048
+ [
1049
+ "font",
1050
+ false,
1051
+ true,
1052
+ false,
1053
+ false,
1054
+ true,
1055
+ :loose,
1056
+ true,
1057
+ "local change to font ",
1058
+ HTML_INLINE,
1059
+ nil,
1060
+ [],
1061
+ FONT_ATTRS,
1062
+ [],
1063
+ ],
1064
+ [
1065
+ "form",
1066
+ false,
1067
+ false,
1068
+ false,
1069
+ false,
1070
+ false,
1071
+ :any,
1072
+ false,
1073
+ "interactive form ",
1074
+ FORM_CONTENTS,
1075
+ "fieldset",
1076
+ FORM_ATTRS,
1077
+ TARGET_ATTR,
1078
+ ACTION_ATTR,
1079
+ ],
1080
+ [
1081
+ "frame",
1082
+ false,
1083
+ true,
1084
+ true,
1085
+ true,
1086
+ false,
1087
+ :frameset,
1088
+ false,
1089
+ "subwindow ",
1090
+ EMPTY,
1091
+ nil,
1092
+ [],
1093
+ FRAME_ATTRS,
1094
+ [],
1095
+ ],
1096
+ [
1097
+ "frameset",
1098
+ false,
1099
+ false,
1100
+ false,
1101
+ false,
1102
+ false,
1103
+ :frameset,
1104
+ false,
1105
+ "window subdivision",
1106
+ FRAMESET_CONTENTS,
1107
+ "noframes",
1108
+ [],
1109
+ FRAMESET_ATTRS,
1110
+ [],
1111
+ ],
1112
+ [
1113
+ "htrue",
1114
+ false,
1115
+ false,
1116
+ false,
1117
+ false,
1118
+ false,
1119
+ :any,
1120
+ false,
1121
+ "heading ",
1122
+ HTML_INLINE,
1123
+ nil,
1124
+ HTML_ATTRS,
1125
+ ALIGN_ATTR,
1126
+ [],
1127
+ ],
1128
+ [
1129
+ "htrue",
1130
+ false,
1131
+ false,
1132
+ false,
1133
+ false,
1134
+ false,
1135
+ :any,
1136
+ false,
1137
+ "heading ",
1138
+ HTML_INLINE,
1139
+ nil,
1140
+ HTML_ATTRS,
1141
+ ALIGN_ATTR,
1142
+ [],
1143
+ ],
1144
+ [
1145
+ "htrue",
1146
+ false,
1147
+ false,
1148
+ false,
1149
+ false,
1150
+ false,
1151
+ :any,
1152
+ false,
1153
+ "heading ",
1154
+ HTML_INLINE,
1155
+ nil,
1156
+ HTML_ATTRS,
1157
+ ALIGN_ATTR,
1158
+ [],
1159
+ ],
1160
+ [
1161
+ "h4",
1162
+ false,
1163
+ false,
1164
+ false,
1165
+ false,
1166
+ false,
1167
+ :any,
1168
+ false,
1169
+ "heading ",
1170
+ HTML_INLINE,
1171
+ nil,
1172
+ HTML_ATTRS,
1173
+ ALIGN_ATTR,
1174
+ [],
1175
+ ],
1176
+ [
1177
+ "h5",
1178
+ false,
1179
+ false,
1180
+ false,
1181
+ false,
1182
+ false,
1183
+ :any,
1184
+ false,
1185
+ "heading ",
1186
+ HTML_INLINE,
1187
+ nil,
1188
+ HTML_ATTRS,
1189
+ ALIGN_ATTR,
1190
+ [],
1191
+ ],
1192
+ [
1193
+ "h6",
1194
+ false,
1195
+ false,
1196
+ false,
1197
+ false,
1198
+ false,
1199
+ :any,
1200
+ false,
1201
+ "heading ",
1202
+ HTML_INLINE,
1203
+ nil,
1204
+ HTML_ATTRS,
1205
+ ALIGN_ATTR,
1206
+ [],
1207
+ ],
1208
+ [
1209
+ "head",
1210
+ true,
1211
+ true,
1212
+ false,
1213
+ false,
1214
+ false,
1215
+ :any,
1216
+ false,
1217
+ "document head ",
1218
+ HEAD_CONTENTS,
1219
+ nil,
1220
+ HEAD_ATTRS,
1221
+ [],
1222
+ [],
1223
+ ],
1224
+ [
1225
+ "hr",
1226
+ false,
1227
+ true,
1228
+ true,
1229
+ true,
1230
+ false,
1231
+ :any,
1232
+ false,
1233
+ "horizontal rule ",
1234
+ EMPTY,
1235
+ nil,
1236
+ HTML_ATTRS,
1237
+ HR_DEPR,
1238
+ [],
1239
+ ],
1240
+ [
1241
+ "html",
1242
+ true,
1243
+ true,
1244
+ false,
1245
+ false,
1246
+ false,
1247
+ :any,
1248
+ false,
1249
+ "document root element ",
1250
+ HTML_CONTENT,
1251
+ nil,
1252
+ I18N_ATTRS,
1253
+ VERSION_ATTR,
1254
+ [],
1255
+ ],
1256
+ [
1257
+ "i",
1258
+ false,
1259
+ true,
1260
+ false,
1261
+ false,
1262
+ false,
1263
+ :any,
1264
+ true,
1265
+ "italic text style",
1266
+ HTML_INLINE,
1267
+ nil,
1268
+ HTML_ATTRS,
1269
+ [],
1270
+ [],
1271
+ ],
1272
+ [
1273
+ "iframe",
1274
+ false,
1275
+ false,
1276
+ false,
1277
+ false,
1278
+ false,
1279
+ :any,
1280
+ true,
1281
+ "inline subwindow ",
1282
+ HTML_FLOW,
1283
+ nil,
1284
+ [],
1285
+ IFRAME_ATTRS,
1286
+ [],
1287
+ ],
1288
+ [
1289
+ "img",
1290
+ false,
1291
+ true,
1292
+ true,
1293
+ true,
1294
+ false,
1295
+ :any,
1296
+ true,
1297
+ "embedded image ",
1298
+ EMPTY,
1299
+ nil,
1300
+ IMG_ATTRS,
1301
+ ALIGN_ATTR,
1302
+ SRC_ALT_ATTRS,
1303
+ ],
1304
+ [
1305
+ "input",
1306
+ false,
1307
+ true,
1308
+ true,
1309
+ true,
1310
+ false,
1311
+ :any,
1312
+ true,
1313
+ "form control ",
1314
+ EMPTY,
1315
+ nil,
1316
+ INPUT_ATTRS,
1317
+ ALIGN_ATTR,
1318
+ [],
1319
+ ],
1320
+ [
1321
+ "ins",
1322
+ false,
1323
+ false,
1324
+ false,
1325
+ false,
1326
+ false,
1327
+ :any,
1328
+ true,
1329
+ "inserted text",
1330
+ HTML_FLOW,
1331
+ nil,
1332
+ EDIT_ATTRS,
1333
+ [],
1334
+ [],
1335
+ ],
1336
+ [
1337
+ "isindex",
1338
+ false,
1339
+ true,
1340
+ true,
1341
+ true,
1342
+ true,
1343
+ :loose,
1344
+ false,
1345
+ "single line prompt ",
1346
+ EMPTY,
1347
+ nil,
1348
+ [],
1349
+ PROMPT_ATTRS,
1350
+ [],
1351
+ ],
1352
+ [
1353
+ "kbd",
1354
+ false,
1355
+ false,
1356
+ false,
1357
+ false,
1358
+ false,
1359
+ :any,
1360
+ true,
1361
+ "text to be entered by the user",
1362
+ HTML_INLINE,
1363
+ nil,
1364
+ HTML_ATTRS,
1365
+ [],
1366
+ [],
1367
+ ],
1368
+ [
1369
+ "label",
1370
+ false,
1371
+ false,
1372
+ false,
1373
+ false,
1374
+ false,
1375
+ :any,
1376
+ true,
1377
+ "form field label text ",
1378
+ [HTML_INLINE, MODIFIER],
1379
+ nil,
1380
+ LABEL_ATTRS,
1381
+ [],
1382
+ [],
1383
+ ],
1384
+ [
1385
+ "legend",
1386
+ false,
1387
+ false,
1388
+ false,
1389
+ false,
1390
+ false,
1391
+ :any,
1392
+ false,
1393
+ "fieldset legend ",
1394
+ HTML_INLINE,
1395
+ nil,
1396
+ LEGEND_ATTRS,
1397
+ ALIGN_ATTR,
1398
+ [],
1399
+ ],
1400
+ [
1401
+ "li",
1402
+ false,
1403
+ true,
1404
+ true,
1405
+ false,
1406
+ false,
1407
+ :any,
1408
+ false,
1409
+ "list item ",
1410
+ HTML_FLOW,
1411
+ nil,
1412
+ HTML_ATTRS,
1413
+ [],
1414
+ [],
1415
+ ],
1416
+ [
1417
+ "link",
1418
+ false,
1419
+ true,
1420
+ true,
1421
+ true,
1422
+ false,
1423
+ :any,
1424
+ false,
1425
+ "a media-independent link ",
1426
+ EMPTY,
1427
+ nil,
1428
+ LINK_ATTRS,
1429
+ TARGET_ATTR,
1430
+ [],
1431
+ ],
1432
+ [
1433
+ "map",
1434
+ false,
1435
+ false,
1436
+ false,
1437
+ false,
1438
+ false,
1439
+ :any,
1440
+ true,
1441
+ "client-side image map ",
1442
+ MAP_CONTENTS,
1443
+ nil,
1444
+ HTML_ATTRS,
1445
+ [],
1446
+ NAME_ATTR,
1447
+ ],
1448
+ [
1449
+ "menu",
1450
+ false,
1451
+ false,
1452
+ false,
1453
+ false,
1454
+ true,
1455
+ :loose,
1456
+ false,
1457
+ "menu list ",
1458
+ BLOCKLI_ELT,
1459
+ nil,
1460
+ [],
1461
+ COMPACT_ATTRS,
1462
+ [],
1463
+ ],
1464
+ [
1465
+ "meta",
1466
+ false,
1467
+ true,
1468
+ true,
1469
+ true,
1470
+ false,
1471
+ :any,
1472
+ false,
1473
+ "generic metainformation ",
1474
+ EMPTY,
1475
+ nil,
1476
+ META_ATTRS,
1477
+ [],
1478
+ CONTENT_ATTR,
1479
+ ],
1480
+ [
1481
+ "noframes",
1482
+ false,
1483
+ false,
1484
+ false,
1485
+ false,
1486
+ false,
1487
+ :frameset,
1488
+ false,
1489
+ "alternate content container for non frame-based rendering ",
1490
+ NOFRAMES_CONTENT,
1491
+ "body",
1492
+ HTML_ATTRS,
1493
+ [],
1494
+ [],
1495
+ ],
1496
+ [
1497
+ "noscript",
1498
+ false,
1499
+ false,
1500
+ false,
1501
+ false,
1502
+ false,
1503
+ :any,
1504
+ false,
1505
+ "alternate content container for non script-based rendering ",
1506
+ HTML_FLOW,
1507
+ "div",
1508
+ HTML_ATTRS,
1509
+ [],
1510
+ [],
1511
+ ],
1512
+ [
1513
+ "object",
1514
+ false,
1515
+ false,
1516
+ false,
1517
+ false,
1518
+ false,
1519
+ :any,
1520
+ true,
1521
+ "generic embedded object ",
1522
+ OBJECT_CONTENTS,
1523
+ "div",
1524
+ OBJECT_ATTRS,
1525
+ OBJECT_DEPR,
1526
+ [],
1527
+ ],
1528
+ [
1529
+ "ol",
1530
+ false,
1531
+ false,
1532
+ false,
1533
+ false,
1534
+ false,
1535
+ :any,
1536
+ false,
1537
+ "ordered list ",
1538
+ LI_ELT,
1539
+ "li",
1540
+ HTML_ATTRS,
1541
+ OL_ATTRS,
1542
+ [],
1543
+ ],
1544
+ [
1545
+ "optgroup",
1546
+ false,
1547
+ false,
1548
+ false,
1549
+ false,
1550
+ false,
1551
+ :any,
1552
+ false,
1553
+ "option group ",
1554
+ OPTION_ELT,
1555
+ "option",
1556
+ OPTGROUP_ATTRS,
1557
+ [],
1558
+ LABEL_ATTR,
1559
+ ],
1560
+ [
1561
+ "option",
1562
+ false,
1563
+ true,
1564
+ false,
1565
+ false,
1566
+ false,
1567
+ :any,
1568
+ false,
1569
+ "selectable choice ",
1570
+ HTML_PCDATA,
1571
+ nil,
1572
+ OPTION_ATTRS,
1573
+ [],
1574
+ [],
1575
+ ],
1576
+ [
1577
+ "p",
1578
+ false,
1579
+ true,
1580
+ false,
1581
+ false,
1582
+ false,
1583
+ :any,
1584
+ false,
1585
+ "paragraph ",
1586
+ HTML_INLINE,
1587
+ nil,
1588
+ HTML_ATTRS,
1589
+ ALIGN_ATTR,
1590
+ [],
1591
+ ],
1592
+ [
1593
+ "param",
1594
+ false,
1595
+ true,
1596
+ true,
1597
+ true,
1598
+ false,
1599
+ :any,
1600
+ false,
1601
+ "named property value ",
1602
+ EMPTY,
1603
+ nil,
1604
+ PARAM_ATTRS,
1605
+ [],
1606
+ NAME_ATTR,
1607
+ ],
1608
+ [
1609
+ "pre",
1610
+ false,
1611
+ false,
1612
+ false,
1613
+ false,
1614
+ false,
1615
+ :any,
1616
+ false,
1617
+ "preformatted text ",
1618
+ PRE_CONTENT,
1619
+ nil,
1620
+ HTML_ATTRS,
1621
+ WIDTH_ATTR,
1622
+ [],
1623
+ ],
1624
+ [
1625
+ "q",
1626
+ false,
1627
+ false,
1628
+ false,
1629
+ false,
1630
+ false,
1631
+ :any,
1632
+ true,
1633
+ "short inline quotation ",
1634
+ HTML_INLINE,
1635
+ nil,
1636
+ QUOTE_ATTRS,
1637
+ [],
1638
+ [],
1639
+ ],
1640
+ [
1641
+ "s",
1642
+ false,
1643
+ true,
1644
+ false,
1645
+ false,
1646
+ true,
1647
+ :loose,
1648
+ true,
1649
+ "strike-through text style",
1650
+ HTML_INLINE,
1651
+ nil,
1652
+ [],
1653
+ HTML_ATTRS,
1654
+ [],
1655
+ ],
1656
+ [
1657
+ "samp",
1658
+ false,
1659
+ false,
1660
+ false,
1661
+ false,
1662
+ false,
1663
+ :any,
1664
+ true,
1665
+ "sample program output, scripts, etc.",
1666
+ HTML_INLINE,
1667
+ nil,
1668
+ HTML_ATTRS,
1669
+ [],
1670
+ [],
1671
+ ],
1672
+ [
1673
+ "script",
1674
+ false,
1675
+ false,
1676
+ false,
1677
+ false,
1678
+ false,
1679
+ :any,
1680
+ true,
1681
+ "script statements ",
1682
+ HTML_CDATA,
1683
+ nil,
1684
+ SCRIPT_ATTRS,
1685
+ LANGUAGE_ATTR,
1686
+ TYPE_ATTR,
1687
+ ],
1688
+ [
1689
+ "select",
1690
+ false,
1691
+ false,
1692
+ false,
1693
+ false,
1694
+ false,
1695
+ :any,
1696
+ true,
1697
+ "option selector ",
1698
+ SELECT_CONTENT,
1699
+ nil,
1700
+ SELECT_ATTRS,
1701
+ [],
1702
+ [],
1703
+ ],
1704
+ [
1705
+ "small",
1706
+ false,
1707
+ true,
1708
+ false,
1709
+ false,
1710
+ false,
1711
+ :any,
1712
+ true,
1713
+ "small text style",
1714
+ HTML_INLINE,
1715
+ nil,
1716
+ HTML_ATTRS,
1717
+ [],
1718
+ [],
1719
+ ],
1720
+ [
1721
+ "span",
1722
+ false,
1723
+ false,
1724
+ false,
1725
+ false,
1726
+ false,
1727
+ :any,
1728
+ true,
1729
+ "generic language/style container ",
1730
+ HTML_INLINE,
1731
+ nil,
1732
+ HTML_ATTRS,
1733
+ [],
1734
+ [],
1735
+ ],
1736
+ [
1737
+ "strike",
1738
+ false,
1739
+ true,
1740
+ false,
1741
+ false,
1742
+ true,
1743
+ :loose,
1744
+ true,
1745
+ "strike-through text",
1746
+ HTML_INLINE,
1747
+ nil,
1748
+ [],
1749
+ HTML_ATTRS,
1750
+ [],
1751
+ ],
1752
+ [
1753
+ "strong",
1754
+ false,
1755
+ true,
1756
+ false,
1757
+ false,
1758
+ false,
1759
+ :any,
1760
+ true,
1761
+ "strong emphasis",
1762
+ HTML_INLINE,
1763
+ nil,
1764
+ HTML_ATTRS,
1765
+ [],
1766
+ [],
1767
+ ],
1768
+ [
1769
+ "style",
1770
+ false,
1771
+ false,
1772
+ false,
1773
+ false,
1774
+ false,
1775
+ :any,
1776
+ false,
1777
+ "style info ",
1778
+ HTML_CDATA,
1779
+ nil,
1780
+ STYLE_ATTRS,
1781
+ [],
1782
+ TYPE_ATTR,
1783
+ ],
1784
+ [
1785
+ "sub",
1786
+ false,
1787
+ true,
1788
+ false,
1789
+ false,
1790
+ false,
1791
+ :any,
1792
+ true,
1793
+ "subscript",
1794
+ HTML_INLINE,
1795
+ nil,
1796
+ HTML_ATTRS,
1797
+ [],
1798
+ [],
1799
+ ],
1800
+ [
1801
+ "sup",
1802
+ false,
1803
+ true,
1804
+ false,
1805
+ false,
1806
+ false,
1807
+ :any,
1808
+ true,
1809
+ "superscript ",
1810
+ HTML_INLINE,
1811
+ nil,
1812
+ HTML_ATTRS,
1813
+ [],
1814
+ [],
1815
+ ],
1816
+ [
1817
+ "table",
1818
+ false,
1819
+ false,
1820
+ false,
1821
+ false,
1822
+ false,
1823
+ :any,
1824
+ false,
1825
+ "",
1826
+ TABLE_CONTENTS,
1827
+ "tr",
1828
+ TABLE_ATTRS,
1829
+ TABLE_DEPR,
1830
+ [],
1831
+ ],
1832
+ [
1833
+ "tbody",
1834
+ true,
1835
+ false,
1836
+ false,
1837
+ false,
1838
+ false,
1839
+ :any,
1840
+ false,
1841
+ "table body ",
1842
+ TR_ELT,
1843
+ "tr",
1844
+ TALIGN_ATTRS,
1845
+ [],
1846
+ [],
1847
+ ],
1848
+ [
1849
+ "td",
1850
+ false,
1851
+ false,
1852
+ false,
1853
+ false,
1854
+ false,
1855
+ :any,
1856
+ false,
1857
+ "table data cell",
1858
+ HTML_FLOW,
1859
+ nil,
1860
+ TH_TD_ATTR,
1861
+ TH_TD_DEPR,
1862
+ [],
1863
+ ],
1864
+ [
1865
+ "textarea",
1866
+ false,
1867
+ false,
1868
+ false,
1869
+ false,
1870
+ false,
1871
+ :any,
1872
+ true,
1873
+ "multi-line text field ",
1874
+ HTML_PCDATA,
1875
+ nil,
1876
+ TEXTAREA_ATTRS,
1877
+ [],
1878
+ ROWS_COLS_ATTR,
1879
+ ],
1880
+ [
1881
+ "tfoot",
1882
+ false,
1883
+ true,
1884
+ false,
1885
+ false,
1886
+ false,
1887
+ :any,
1888
+ false,
1889
+ "table footer ",
1890
+ TR_ELT,
1891
+ "tr",
1892
+ TALIGN_ATTRS,
1893
+ [],
1894
+ [],
1895
+ ],
1896
+ [
1897
+ "th",
1898
+ false,
1899
+ true,
1900
+ false,
1901
+ false,
1902
+ false,
1903
+ :any,
1904
+ false,
1905
+ "table header cell",
1906
+ HTML_FLOW,
1907
+ nil,
1908
+ TH_TD_ATTR,
1909
+ TH_TD_DEPR,
1910
+ [],
1911
+ ],
1912
+ [
1913
+ "thead",
1914
+ false,
1915
+ true,
1916
+ false,
1917
+ false,
1918
+ false,
1919
+ :any,
1920
+ false,
1921
+ "table header ",
1922
+ TR_ELT,
1923
+ "tr",
1924
+ TALIGN_ATTRS,
1925
+ [],
1926
+ [],
1927
+ ],
1928
+ [
1929
+ "title",
1930
+ false,
1931
+ false,
1932
+ false,
1933
+ false,
1934
+ false,
1935
+ :any,
1936
+ false,
1937
+ "document title ",
1938
+ HTML_PCDATA,
1939
+ nil,
1940
+ I18N_ATTRS,
1941
+ [],
1942
+ [],
1943
+ ],
1944
+ [
1945
+ "tr",
1946
+ false,
1947
+ false,
1948
+ false,
1949
+ false,
1950
+ false,
1951
+ :any,
1952
+ false,
1953
+ "table row ",
1954
+ TR_CONTENTS,
1955
+ "td",
1956
+ TALIGN_ATTRS,
1957
+ BGCOLOR_ATTR,
1958
+ [],
1959
+ ],
1960
+ [
1961
+ "tt",
1962
+ false,
1963
+ true,
1964
+ false,
1965
+ false,
1966
+ false,
1967
+ :any,
1968
+ true,
1969
+ "teletype or monospaced text style",
1970
+ HTML_INLINE,
1971
+ nil,
1972
+ HTML_ATTRS,
1973
+ [],
1974
+ [],
1975
+ ],
1976
+ [
1977
+ "u",
1978
+ false,
1979
+ true,
1980
+ false,
1981
+ false,
1982
+ true,
1983
+ :loose,
1984
+ true,
1985
+ "underlined text style",
1986
+ HTML_INLINE,
1987
+ nil,
1988
+ [],
1989
+ HTML_ATTRS,
1990
+ [],
1991
+ ],
1992
+ [
1993
+ "ul",
1994
+ false,
1995
+ false,
1996
+ false,
1997
+ false,
1998
+ false,
1999
+ :any,
2000
+ false,
2001
+ "unordered list ",
2002
+ LI_ELT,
2003
+ "li",
2004
+ HTML_ATTRS,
2005
+ UL_DEPR,
2006
+ [],
2007
+ ],
2008
+ [
2009
+ "var",
2010
+ false,
2011
+ false,
2012
+ false,
2013
+ false,
2014
+ false,
2015
+ :any,
2016
+ true,
2017
+ "instance of a variable or program argument",
2018
+ HTML_INLINE,
2019
+ nil,
2020
+ HTML_ATTRS,
2021
+ [],
2022
+ [],
2023
+ ],
2024
+ ].each do |descriptor|
2025
+ name = descriptor[0]
2026
+
2027
+ d = Desc.new(*descriptor)
2028
+
2029
+ # flatten all the attribute lists (Ruby1.9, *[a,b,c] can be
2030
+ # used to flatten a literal list, but not in Ruby1.8).
2031
+ d[:subelts] = d[:subelts].flatten
2032
+ d[:attrs_opt] = d[:attrs_opt].flatten
2033
+ d[:attrs_depr] = d[:attrs_depr].flatten
2034
+ d[:attrs_req] = d[:attrs_req].flatten
2035
+
2036
+ DefaultDescriptions[name] = d
2037
+ end
2038
+ end
2039
+ end
2040
+ end