HTMLDTD.h 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032
  1. /* The HTML DTD -- software interface in libwww
  2. HTML DTD - SOFTWARE INTERFACE
  3. SGML purists should excuse the use of the term "DTD" in this file to
  4. represent DTD-related information which is not exactly a DTD itself.
  5. The C modular structure doesn't work very well here, as the dtd is
  6. partly in the .h and partly in the .c which are not very independent.
  7. Tant pis.
  8. */
  9. #ifndef HTMLDTD_H
  10. #define HTMLDTD_H
  11. #include <SGML.h>
  12. #include <HTFont.h>
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. /*
  17. * Valid name chars for tag parsing.
  18. */
  19. #define IsNmStart(c) (isalpha(UCH(c)))
  20. #define IsNmChar(c) (isalnum(UCH(c)) || \
  21. c == '_' || c=='-' || c == '.' || c==':')
  22. #define ReallyEmptyTagNum(e) ((HTML_dtd.tags[e].contents == SGML_EMPTY) && \
  23. !(HTML_dtd.tags[e].flags & Tgf_nreie))
  24. #define ReallyEmptyTag(t) ((t->contents == SGML_EMPTY) && \
  25. !(t->flags & Tgf_nreie))
  26. /*
  27. Element Numbers
  28. *//*
  29. Must Match all tables by element!
  30. These include tables in HTMLDTD.c and code in HTML.c.
  31. */ typedef enum {
  32. HTML_A,
  33. HTML_ABBREV,
  34. HTML_ACRONYM,
  35. HTML_ADDRESS,
  36. HTML_APPLET,
  37. HTML_AREA,
  38. HTML_AU,
  39. HTML_AUTHOR,
  40. HTML_B,
  41. HTML_BANNER,
  42. HTML_BASE,
  43. HTML_BASEFONT,
  44. HTML_BDO,
  45. HTML_BGSOUND,
  46. HTML_BIG,
  47. HTML_BLINK,
  48. HTML_BLOCKQUOTE,
  49. HTML_BODY,
  50. HTML_BODYTEXT,
  51. HTML_BQ,
  52. HTML_BR,
  53. HTML_BUTTON,
  54. HTML_CAPTION,
  55. HTML_CENTER,
  56. HTML_CITE,
  57. HTML_CODE,
  58. HTML_COL,
  59. HTML_COLGROUP,
  60. HTML_COMMENT,
  61. HTML_CREDIT,
  62. HTML_DD,
  63. HTML_DEL,
  64. HTML_DFN,
  65. HTML_DIR,
  66. HTML_DIV,
  67. HTML_DL,
  68. HTML_DLC,
  69. HTML_DT,
  70. HTML_EM,
  71. HTML_EMBED,
  72. HTML_FIELDSET,
  73. HTML_FIG,
  74. HTML_FN,
  75. HTML_FONT,
  76. HTML_FORM,
  77. HTML_FRAME,
  78. HTML_FRAMESET,
  79. HTML_H1,
  80. HTML_H2,
  81. HTML_H3,
  82. HTML_H4,
  83. HTML_H5,
  84. HTML_H6,
  85. HTML_HEAD,
  86. HTML_HR,
  87. HTML_HTML,
  88. HTML_HY,
  89. HTML_I,
  90. HTML_IFRAME,
  91. HTML_IMG,
  92. HTML_INPUT,
  93. HTML_INS,
  94. HTML_ISINDEX,
  95. HTML_KBD,
  96. HTML_KEYGEN,
  97. HTML_LABEL,
  98. HTML_LEGEND,
  99. HTML_LH,
  100. HTML_LI,
  101. HTML_LINK,
  102. HTML_LISTING,
  103. HTML_MAP,
  104. HTML_MARQUEE,
  105. HTML_MATH,
  106. HTML_MENU,
  107. HTML_META,
  108. HTML_NEXTID,
  109. HTML_NOFRAMES,
  110. HTML_NOTE,
  111. HTML_OBJECT,
  112. HTML_OL,
  113. HTML_OPTION,
  114. HTML_OVERLAY,
  115. HTML_P,
  116. HTML_PARAM,
  117. HTML_PLAINTEXT,
  118. HTML_PRE,
  119. HTML_Q,
  120. HTML_S,
  121. HTML_SAMP,
  122. HTML_SCRIPT,
  123. HTML_SELECT,
  124. HTML_SHY,
  125. HTML_SMALL,
  126. HTML_SPAN,
  127. HTML_SPOT,
  128. HTML_STRIKE,
  129. HTML_STRONG,
  130. HTML_STYLE,
  131. HTML_SUB,
  132. HTML_SUP,
  133. HTML_TAB,
  134. HTML_TABLE,
  135. HTML_TBODY,
  136. HTML_TD,
  137. HTML_TEXTAREA,
  138. HTML_TEXTFLOW,
  139. HTML_TFOOT,
  140. HTML_TH,
  141. HTML_THEAD,
  142. HTML_TITLE,
  143. HTML_TR,
  144. HTML_TT,
  145. HTML_U,
  146. HTML_UL,
  147. HTML_VAR,
  148. HTML_WBR,
  149. HTML_XMP,
  150. HTML_ALT_OBJECT
  151. } HTMLElement;
  152. /* Notes: HTML.c uses a different extension of the HTML_ELEMENTS space
  153. privately, see HTNestedList.h. */
  154. /* Don't replace HTML_ELEMENTS with TABLESIZE(mumble_dtd.tags). */
  155. /* Keep the following defines in synch with the above enum! */
  156. /* HTML_ELEMENTS: number of elements visible to Lynx code in general,
  157. alphabetic (ASCII) order. */
  158. #define HTML_ELEMENTS 118
  159. /* HTML_ALL_ELEMENTS: number of elements visible to SGML parser,
  160. additional variant(s) at end. */
  161. #define HTML_ALL_ELEMENTS 119
  162. /*
  163. Attribute numbers
  164. */
  165. /*
  166. Identifier is HTML_<element>_<attribute>.
  167. These must match the tables in HTML.c!
  168. */
  169. #define HTML_A_ACCESSKEY 0
  170. #define HTML_A_CHARSET 1 /* i18n draft, added tentatively - KW */
  171. #define HTML_A_CLASS 2
  172. #define HTML_A_CLEAR 3
  173. #define HTML_A_COORDS 4
  174. #define HTML_A_DIR 5
  175. #define HTML_A_HREF 6
  176. #define HTML_A_ID 7
  177. #define HTML_A_ISMAP 8
  178. #define HTML_A_LANG 9
  179. #define HTML_A_MD 10
  180. #define HTML_A_NAME 11
  181. #define HTML_A_NOTAB 12
  182. #define HTML_A_ONCLICK 13
  183. #define HTML_A_ONMOUSEOUT 14
  184. #define HTML_A_ONMOUSEOVER 15
  185. #define HTML_A_REL 16
  186. #define HTML_A_REV 17
  187. #define HTML_A_SHAPE 18
  188. #define HTML_A_STYLE 19
  189. #define HTML_A_TABINDEX 20
  190. #define HTML_A_TARGET 21
  191. #define HTML_A_TITLE 22
  192. #define HTML_A_TYPE 23
  193. #define HTML_A_URN 24
  194. #define HTML_A_ATTRIBUTES 25
  195. #define HTML_ADDRESS_CLASS 0
  196. #define HTML_ADDRESS_CLEAR 1
  197. #define HTML_ADDRESS_DIR 2
  198. #define HTML_ADDRESS_ID 3
  199. #define HTML_ADDRESS_LANG 4
  200. #define HTML_ADDRESS_NOWRAP 5
  201. #define HTML_ADDRESS_STYLE 6
  202. #define HTML_ADDRESS_TITLE 7
  203. #define HTML_ADDRESS_ATTRIBUTES 8
  204. #define HTML_APPLET_ALIGN 0
  205. #define HTML_APPLET_ALT 1
  206. #define HTML_APPLET_CLASS 2
  207. #define HTML_APPLET_CLEAR 3
  208. #define HTML_APPLET_CODE 4
  209. #define HTML_APPLET_CODEBASE 5
  210. #define HTML_APPLET_DIR 6
  211. #define HTML_APPLET_DOWNLOAD 7
  212. #define HTML_APPLET_HEIGHT 8
  213. #define HTML_APPLET_HSPACE 9
  214. #define HTML_APPLET_ID 10
  215. #define HTML_APPLET_LANG 11
  216. #define HTML_APPLET_NAME 12
  217. #define HTML_APPLET_STYLE 13
  218. #define HTML_APPLET_TITLE 14
  219. #define HTML_APPLET_VSPACE 15
  220. #define HTML_APPLET_WIDTH 16
  221. #define HTML_APPLET_ATTRIBUTES 17
  222. #define HTML_AREA_ALT 0
  223. #define HTML_AREA_CLASS 1
  224. #define HTML_AREA_CLEAR 2
  225. #define HTML_AREA_COORDS 3
  226. #define HTML_AREA_DIR 4
  227. #define HTML_AREA_HREF 5
  228. #define HTML_AREA_ID 6
  229. #define HTML_AREA_LANG 7
  230. #define HTML_AREA_NOHREF 8
  231. #define HTML_AREA_NONOTAB 9
  232. #define HTML_AREA_ONCLICK 10
  233. #define HTML_AREA_ONMOUSEOUT 11
  234. #define HTML_AREA_ONMOUSEOVER 12
  235. #define HTML_AREA_SHAPE 13
  236. #define HTML_AREA_STYLE 14
  237. #define HTML_AREA_TABINDEX 15
  238. #define HTML_AREA_TARGET 16
  239. #define HTML_AREA_TITLE 17
  240. #define HTML_AREA_ATTRIBUTES 18
  241. #define HTML_BASE_HREF 0
  242. #define HTML_BASE_TARGET 1
  243. #define HTML_BASE_TITLE 2
  244. #define HTML_BASE_ATTRIBUTES 3
  245. #define HTML_BGSOUND_CLASS 0
  246. #define HTML_BGSOUND_CLEAR 1
  247. #define HTML_BGSOUND_DIR 2
  248. #define HTML_BGSOUND_ID 3
  249. #define HTML_BGSOUND_LANG 4
  250. #define HTML_BGSOUND_LOOP 5
  251. #define HTML_BGSOUND_SRC 6
  252. #define HTML_BGSOUND_STYLE 7
  253. #define HTML_BGSOUND_TITLE 8
  254. #define HTML_BGSOUND_ATTRIBUTES 9
  255. #define HTML_BODY_ALINK 0
  256. #define HTML_BODY_BACKGROUND 1
  257. #define HTML_BODY_BGCOLOR 2
  258. #define HTML_BODY_CLASS 3
  259. #define HTML_BODY_CLEAR 4
  260. #define HTML_BODY_DIR 5
  261. #define HTML_BODY_ID 6
  262. #define HTML_BODY_LANG 7
  263. #define HTML_BODY_LINK 8
  264. #define HTML_BODY_ONLOAD 9
  265. #define HTML_BODY_ONUNLOAD 10
  266. #define HTML_BODY_STYLE 11
  267. #define HTML_BODY_TEXT 12
  268. #define HTML_BODY_TITLE 13
  269. #define HTML_BODY_VLINK 14
  270. #define HTML_BODY_ATTRIBUTES 15
  271. #define HTML_BODYTEXT_CLASS 0
  272. #define HTML_BODYTEXT_CLEAR 1
  273. #define HTML_BODYTEXT_DATA 2
  274. #define HTML_BODYTEXT_DIR 3
  275. #define HTML_BODYTEXT_ID 4
  276. #define HTML_BODYTEXT_LANG 5
  277. #define HTML_BODYTEXT_NAME 6
  278. #define HTML_BODYTEXT_OBJECT 7
  279. #define HTML_BODYTEXT_REF 8
  280. #define HTML_BODYTEXT_STYLE 9
  281. #define HTML_BODYTEXT_TITLE 10
  282. #define HTML_BODYTEXT_TYPE 11
  283. #define HTML_BODYTEXT_VALUE 12
  284. #define HTML_BODYTEXT_VALUETYPE 13
  285. #define HTML_BODYTEXT_ATTRIBUTES 14
  286. #define HTML_BQ_CITE 0
  287. #define HTML_BQ_CLASS 1
  288. #define HTML_BQ_CLEAR 2
  289. #define HTML_BQ_DIR 3
  290. #define HTML_BQ_ID 4
  291. #define HTML_BQ_LANG 5
  292. #define HTML_BQ_NOWRAP 6
  293. #define HTML_BQ_STYLE 7
  294. #define HTML_BQ_TITLE 8
  295. #define HTML_BQ_ATTRIBUTES 9
  296. #define HTML_BUTTON_CLASS 0
  297. #define HTML_BUTTON_CLEAR 1
  298. #define HTML_BUTTON_DIR 2
  299. #define HTML_BUTTON_DISABLED 3
  300. #define HTML_BUTTON_ID 4
  301. #define HTML_BUTTON_LANG 5
  302. #define HTML_BUTTON_NAME 6
  303. #define HTML_BUTTON_ONFOCUS 7
  304. #define HTML_BUTTON_ONBLUR 8
  305. #define HTML_BUTTON_STYLE 9
  306. #define HTML_BUTTON_TABINDEX 10
  307. #define HTML_BUTTON_TITLE 11
  308. #define HTML_BUTTON_TYPE 12
  309. #define HTML_BUTTON_VALUE 13
  310. #define HTML_BUTTON_ATTRIBUTES 14
  311. #define HTML_CAPTION_ACCESSKEY 0
  312. #define HTML_CAPTION_ALIGN 1
  313. #define HTML_CAPTION_CLASS 2
  314. #define HTML_CAPTION_CLEAR 3
  315. #define HTML_CAPTION_DIR 4
  316. #define HTML_CAPTION_ID 5
  317. #define HTML_CAPTION_LANG 6
  318. #define HTML_CAPTION_STYLE 7
  319. #define HTML_CAPTION_TITLE 8
  320. #define HTML_CAPTION_ATTRIBUTES 9
  321. #define HTML_COL_ALIGN 0
  322. #define HTML_COL_CHAR 1
  323. #define HTML_COL_CHAROFF 2
  324. #define HTML_COL_CLASS 3
  325. #define HTML_COL_CLEAR 4
  326. #define HTML_COL_DIR 5
  327. #define HTML_COL_ID 6
  328. #define HTML_COL_LANG 7
  329. #define HTML_COL_SPAN 8
  330. #define HTML_COL_STYLE 9
  331. #define HTML_COL_TITLE 10
  332. #define HTML_COL_VALIGN 11
  333. #define HTML_COL_WIDTH 12
  334. #define HTML_COL_ATTRIBUTES 13
  335. #define HTML_CREDIT_CLASS 0
  336. #define HTML_CREDIT_CLEAR 1
  337. #define HTML_CREDIT_DIR 2
  338. #define HTML_CREDIT_ID 3
  339. #define HTML_CREDIT_LANG 4
  340. #define HTML_CREDIT_STYLE 5
  341. #define HTML_CREDIT_TITLE 6
  342. #define HTML_CREDIT_ATTRIBUTES 7
  343. #define HTML_DIV_ALIGN 0
  344. #define HTML_DIV_CLASS 1
  345. #define HTML_DIV_CLEAR 2
  346. #define HTML_DIV_DIR 3
  347. #define HTML_DIV_ID 4
  348. #define HTML_DIV_LANG 5
  349. #define HTML_DIV_STYLE 6
  350. #define HTML_DIV_TITLE 7
  351. #define HTML_DIV_ATTRIBUTES 8
  352. #define HTML_DL_CLASS 0
  353. #define HTML_DL_CLEAR 1
  354. #define HTML_DL_COMPACT 2
  355. #define HTML_DL_DIR 3
  356. #define HTML_DL_ID 4
  357. #define HTML_DL_LANG 5
  358. #define HTML_DL_STYLE 6
  359. #define HTML_DL_TITLE 7
  360. #define HTML_DL_ATTRIBUTES 8
  361. #define HTML_EMBED_ALIGN 0
  362. #define HTML_EMBED_ALT 1
  363. #define HTML_EMBED_BORDER 2
  364. #define HTML_EMBED_CLASS 3
  365. #define HTML_EMBED_CLEAR 4
  366. #define HTML_EMBED_DIR 5
  367. #define HTML_EMBED_HEIGHT 6
  368. #define HTML_EMBED_ID 7
  369. #define HTML_EMBED_IMAGEMAP 8
  370. #define HTML_EMBED_ISMAP 9
  371. #define HTML_EMBED_LANG 10
  372. #define HTML_EMBED_MD 11
  373. #define HTML_EMBED_NAME 12
  374. #define HTML_EMBED_NOFLOW 13
  375. #define HTML_EMBED_PARAMS 14
  376. #define HTML_EMBED_SRC 15
  377. #define HTML_EMBED_STYLE 16
  378. #define HTML_EMBED_TITLE 17
  379. #define HTML_EMBED_UNITS 18
  380. #define HTML_EMBED_USEMAP 19
  381. #define HTML_EMBED_WIDTH 20
  382. #define HTML_EMBED_ATTRIBUTES 21
  383. #define HTML_FIELDSET_CLASS 0
  384. #define HTML_FIELDSET_CLEAR 1
  385. #define HTML_FIELDSET_DIR 2
  386. #define HTML_FIELDSET_ID 3
  387. #define HTML_FIELDSET_LANG 4
  388. #define HTML_FIELDSET_STYLE 5
  389. #define HTML_FIELDSET_TITLE 6
  390. #define HTML_FIELDSET_ATTRIBUTES 7
  391. #define HTML_FIG_ALIGN 0
  392. #define HTML_FIG_BORDER 1
  393. #define HTML_FIG_CLASS 2
  394. #define HTML_FIG_CLEAR 3
  395. #define HTML_FIG_DIR 4
  396. #define HTML_FIG_HEIGHT 5
  397. #define HTML_FIG_ID 6
  398. #define HTML_FIG_IMAGEMAP 7
  399. #define HTML_FIG_ISOBJECT 8
  400. #define HTML_FIG_LANG 9
  401. #define HTML_FIG_MD 10
  402. #define HTML_FIG_NOFLOW 11
  403. #define HTML_FIG_SRC 12
  404. #define HTML_FIG_STYLE 13
  405. #define HTML_FIG_TITLE 14
  406. #define HTML_FIG_UNITS 15
  407. #define HTML_FIG_WIDTH 16
  408. #define HTML_FIG_ATTRIBUTES 17
  409. #define HTML_FN_CLASS 0
  410. #define HTML_FN_CLEAR 1
  411. #define HTML_FN_DIR 2
  412. #define HTML_FN_ID 3
  413. #define HTML_FN_LANG 4
  414. #define HTML_FN_STYLE 5
  415. #define HTML_FN_TITLE 6
  416. #define HTML_FN_ATTRIBUTES 7
  417. #define HTML_FONT_CLASS 0
  418. #define HTML_FONT_CLEAR 1
  419. #define HTML_FONT_COLOR 2
  420. #define HTML_FONT_DIR 3
  421. #define HTML_FONT_FACE 4
  422. #define HTML_FONT_ID 5
  423. #define HTML_FONT_LANG 6
  424. #define HTML_FONT_SIZE 7
  425. #define HTML_FONT_STYLE 8
  426. #define HTML_FONT_ATTRIBUTES 9
  427. #define HTML_FORM_ACCEPT_CHARSET 0 /* HTML 4.0 draft - kw */
  428. #define HTML_FORM_ACTION 1
  429. #define HTML_FORM_CLASS 2
  430. #define HTML_FORM_CLEAR 3
  431. #define HTML_FORM_DIR 4
  432. #define HTML_FORM_ENCTYPE 5
  433. #define HTML_FORM_ID 6
  434. #define HTML_FORM_LANG 7
  435. #define HTML_FORM_METHOD 8
  436. #define HTML_FORM_ONSUBMIT 9
  437. #define HTML_FORM_SCRIPT 10
  438. #define HTML_FORM_STYLE 11
  439. #define HTML_FORM_SUBJECT 12
  440. #define HTML_FORM_TARGET 13
  441. #define HTML_FORM_TITLE 14
  442. #define HTML_FORM_ATTRIBUTES 15
  443. #define HTML_FRAME_ID 0
  444. #define HTML_FRAME_LONGDESC 1
  445. #define HTML_FRAME_MARGINHEIGHT 2
  446. #define HTML_FRAME_MARGINWIDTH 3
  447. #define HTML_FRAME_NAME 4
  448. #define HTML_FRAME_NORESIZE 5
  449. #define HTML_FRAME_SCROLLING 6
  450. #define HTML_FRAME_SRC 7
  451. #define HTML_FRAME_ATTRIBUTES 8
  452. #define HTML_FRAMESET_COLS 0
  453. #define HTML_FRAMESET_ROWS 1
  454. #define HTML_FRAMESET_ATTRIBUTES 2
  455. #define HTML_GEN_CLASS 0
  456. #define HTML_GEN_CLEAR 1
  457. #define HTML_GEN_DIR 2
  458. #define HTML_GEN_ID 3
  459. #define HTML_GEN_LANG 4
  460. #define HTML_GEN_STYLE 5
  461. #define HTML_GEN_TITLE 6
  462. #define HTML_GEN_ATTRIBUTES 7
  463. #define HTML_H_ALIGN 0
  464. #define HTML_H_CLASS 1
  465. #define HTML_H_CLEAR 2
  466. #define HTML_H_DINGBAT 3
  467. #define HTML_H_DIR 4
  468. #define HTML_H_ID 5
  469. #define HTML_H_LANG 6
  470. #define HTML_H_MD 7
  471. #define HTML_H_NOWRAP 8
  472. #define HTML_H_SEQNUM 9
  473. #define HTML_H_SKIP 10
  474. #define HTML_H_SRC 11
  475. #define HTML_H_STYLE 12
  476. #define HTML_H_TITLE 13
  477. #define HTML_H_ATTRIBUTES 14
  478. #define HTML_HR_ALIGN 0
  479. #define HTML_HR_CLASS 1
  480. #define HTML_HR_CLEAR 2
  481. #define HTML_HR_DIR 3
  482. #define HTML_HR_ID 4
  483. #define HTML_HR_MD 5
  484. #define HTML_HR_NOSHADE 6
  485. #define HTML_HR_SIZE 7
  486. #define HTML_HR_SRC 8
  487. #define HTML_HR_STYLE 9
  488. #define HTML_HR_TITLE 10
  489. #define HTML_HR_WIDTH 11
  490. #define HTML_HR_ATTRIBUTES 12
  491. #define HTML_IFRAME_ALIGN 0
  492. #define HTML_IFRAME_FRAMEBORDER 1
  493. #define HTML_IFRAME_HEIGHT 2
  494. #define HTML_IFRAME_ID 3
  495. #define HTML_IFRAME_LONGDESC 4
  496. #define HTML_IFRAME_MARGINHEIGHT 5
  497. #define HTML_IFRAME_MARGINWIDTH 6
  498. #define HTML_IFRAME_NAME 7
  499. #define HTML_IFRAME_SCROLLING 8
  500. #define HTML_IFRAME_SRC 9
  501. #define HTML_IFRAME_STYLE 10
  502. #define HTML_IFRAME_WIDTH 11
  503. #define HTML_IFRAME_ATTRIBUTES 12
  504. #define HTML_IMG_ALIGN 0
  505. #define HTML_IMG_ALT 1
  506. #define HTML_IMG_BORDER 2
  507. #define HTML_IMG_CLASS 3
  508. #define HTML_IMG_CLEAR 4
  509. #define HTML_IMG_DIR 5
  510. #define HTML_IMG_HEIGHT 6
  511. #define HTML_IMG_ID 7
  512. #define HTML_IMG_ISMAP 8
  513. #define HTML_IMG_ISOBJECT 9
  514. #define HTML_IMG_LANG 10
  515. #define HTML_IMG_LONGDESC 11
  516. #define HTML_IMG_MD 12
  517. #define HTML_IMG_SRC 13
  518. #define HTML_IMG_STYLE 14
  519. #define HTML_IMG_TITLE 15
  520. #define HTML_IMG_UNITS 16
  521. #define HTML_IMG_USEMAP 17
  522. #define HTML_IMG_WIDTH 18
  523. #define HTML_IMG_ATTRIBUTES 19
  524. #define HTML_INPUT_ACCEPT 0
  525. #define HTML_INPUT_ACCEPT_CHARSET 1 /* RFC 2070 HTML i18n - kw */
  526. #define HTML_INPUT_ALIGN 2
  527. #define HTML_INPUT_ALT 3
  528. #define HTML_INPUT_CHECKED 4
  529. #define HTML_INPUT_CLASS 5
  530. #define HTML_INPUT_CLEAR 6
  531. #define HTML_INPUT_DIR 7
  532. #define HTML_INPUT_DISABLED 8
  533. #define HTML_INPUT_ERROR 9
  534. #define HTML_INPUT_HEIGHT 10
  535. #define HTML_INPUT_ID 11
  536. #define HTML_INPUT_LANG 12
  537. #define HTML_INPUT_MAX 13
  538. #define HTML_INPUT_MAXLENGTH 14
  539. #define HTML_INPUT_MD 15
  540. #define HTML_INPUT_MIN 16
  541. #define HTML_INPUT_NAME 17
  542. #define HTML_INPUT_NOTAB 18
  543. #define HTML_INPUT_ONBLUR 19
  544. #define HTML_INPUT_ONCHANGE 20
  545. #define HTML_INPUT_ONCLICK 21
  546. #define HTML_INPUT_ONFOCUS 22
  547. #define HTML_INPUT_ONSELECT 23
  548. #define HTML_INPUT_SIZE 24
  549. #define HTML_INPUT_SRC 25
  550. #define HTML_INPUT_STYLE 26
  551. #define HTML_INPUT_TABINDEX 27
  552. #define HTML_INPUT_TITLE 28
  553. #define HTML_INPUT_TYPE 29
  554. #define HTML_INPUT_VALUE 30
  555. #define HTML_INPUT_WIDTH 31
  556. #define HTML_INPUT_ATTRIBUTES 32
  557. #define HTML_ISINDEX_ACTION 0 /* Treat as synonym for HREF. - FM */
  558. #define HTML_ISINDEX_DIR 1
  559. #define HTML_ISINDEX_HREF 2 /* HTML 3.0 "action". - FM */
  560. #define HTML_ISINDEX_ID 3
  561. #define HTML_ISINDEX_LANG 4
  562. #define HTML_ISINDEX_PROMPT 5 /* HTML 3.0 "prompt". - FM */
  563. #define HTML_ISINDEX_TITLE 6
  564. #define HTML_ISINDEX_ATTRIBUTES 7
  565. #define HTML_KEYGEN_CHALLENGE 0
  566. #define HTML_KEYGEN_CLASS 1
  567. #define HTML_KEYGEN_DIR 2
  568. #define HTML_KEYGEN_ID 3
  569. #define HTML_KEYGEN_LANG 4
  570. #define HTML_KEYGEN_NAME 5
  571. #define HTML_KEYGEN_STYLE 6
  572. #define HTML_KEYGEN_TITLE 7
  573. #define HTML_KEYGEN_ATTRIBUTES 8
  574. #define HTML_LABEL_ACCESSKEY 0
  575. #define HTML_LABEL_CLASS 1
  576. #define HTML_LABEL_CLEAR 2
  577. #define HTML_LABEL_DIR 3
  578. #define HTML_LABEL_FOR 4
  579. #define HTML_LABEL_ID 5
  580. #define HTML_LABEL_LANG 6
  581. #define HTML_LABEL_ONCLICK 7
  582. #define HTML_LABEL_STYLE 8
  583. #define HTML_LABEL_TITLE 9
  584. #define HTML_LABEL_ATTRIBUTES 10
  585. #define HTML_LEGEND_ACCESSKEY 0
  586. #define HTML_LEGEND_ALIGN 1
  587. #define HTML_LEGEND_CLASS 2
  588. #define HTML_LEGEND_CLEAR 3
  589. #define HTML_LEGEND_DIR 4
  590. #define HTML_LEGEND_ID 5
  591. #define HTML_LEGEND_LANG 6
  592. #define HTML_LEGEND_STYLE 7
  593. #define HTML_LEGEND_TITLE 8
  594. #define HTML_LEGEND_ATTRIBUTES 9
  595. #define HTML_LI_CLASS 0
  596. #define HTML_LI_CLEAR 1
  597. #define HTML_LI_DINGBAT 2
  598. #define HTML_LI_DIR 3
  599. #define HTML_LI_ID 4
  600. #define HTML_LI_LANG 5
  601. #define HTML_LI_MD 6
  602. #define HTML_LI_SKIP 7
  603. #define HTML_LI_SRC 8
  604. #define HTML_LI_STYLE 9
  605. #define HTML_LI_TITLE 10
  606. #define HTML_LI_TYPE 11
  607. #define HTML_LI_VALUE 12
  608. #define HTML_LI_ATTRIBUTES 13
  609. #define HTML_LINK_CHARSET 0 /* RFC 2070 HTML i18n - kw */
  610. #define HTML_LINK_CLASS 1
  611. #define HTML_LINK_HREF 2
  612. #define HTML_LINK_ID 3
  613. #define HTML_LINK_MEDIA 4
  614. #define HTML_LINK_REL 5
  615. #define HTML_LINK_REV 6
  616. #define HTML_LINK_STYLE 7
  617. #define HTML_LINK_TARGET 8
  618. #define HTML_LINK_TITLE 9
  619. #define HTML_LINK_TYPE 10
  620. #define HTML_LINK_ATTRIBUTES 11
  621. #define HTML_MAP_CLASS 0
  622. #define HTML_MAP_CLEAR 1
  623. #define HTML_MAP_DIR 2
  624. #define HTML_MAP_ID 3
  625. #define HTML_MAP_LANG 4
  626. #define HTML_MAP_NAME 5
  627. #define HTML_MAP_STYLE 6
  628. #define HTML_MAP_TITLE 7
  629. #define HTML_MAP_ATTRIBUTES 8
  630. #define HTML_MATH_BOX 0
  631. #define HTML_MATH_CLASS 1
  632. #define HTML_MATH_CLEAR 2
  633. #define HTML_MATH_DIR 3
  634. #define HTML_MATH_ID 4
  635. #define HTML_MATH_LANG 5
  636. #define HTML_MATH_STYLE 6
  637. #define HTML_MATH_TITLE 7
  638. #define HTML_MATH_ATTRIBUTES 8
  639. #define HTML_META_CONTENT 0
  640. #define HTML_META_HTTP_EQUIV 1 /* For parsing in HTML.c - FM */
  641. #define HTML_META_NAME 2
  642. #define HTML_META_ATTRIBUTES 3
  643. #define NEXTID_N 0
  644. #define HTML_NOTE_CLASS 0
  645. #define HTML_NOTE_CLEAR 1
  646. #define HTML_NOTE_DIR 2
  647. #define HTML_NOTE_ID 3
  648. #define HTML_NOTE_LANG 4
  649. #define HTML_NOTE_MD 5
  650. #define HTML_NOTE_ROLE 6 /* Old name for CLASS - FM */
  651. #define HTML_NOTE_SRC 7
  652. #define HTML_NOTE_STYLE 8
  653. #define HTML_NOTE_TITLE 9
  654. #define HTML_NOTE_ATTRIBUTES 10
  655. #define HTML_OBJECT_ALIGN 0
  656. #define HTML_OBJECT_BORDER 1
  657. #define HTML_OBJECT_CLASS 2
  658. #define HTML_OBJECT_CLASSID 3
  659. #define HTML_OBJECT_CODEBASE 4
  660. #define HTML_OBJECT_CODETYPE 5
  661. #define HTML_OBJECT_DATA 6
  662. #define HTML_OBJECT_DECLARE 7
  663. #define HTML_OBJECT_DIR 8
  664. #define HTML_OBJECT_HEIGHT 9
  665. #define HTML_OBJECT_HSPACE 10
  666. #define HTML_OBJECT_ID 11
  667. #define HTML_OBJECT_ISMAP 12
  668. #define HTML_OBJECT_LANG 13
  669. #define HTML_OBJECT_NAME 14
  670. #define HTML_OBJECT_NOTAB 15
  671. #define HTML_OBJECT_SHAPES 16
  672. #define HTML_OBJECT_STANDBY 17
  673. #define HTML_OBJECT_STYLE 18
  674. #define HTML_OBJECT_TABINDEX 19
  675. #define HTML_OBJECT_TITLE 20
  676. #define HTML_OBJECT_TYPE 21
  677. #define HTML_OBJECT_USEMAP 22
  678. #define HTML_OBJECT_VSPACE 23
  679. #define HTML_OBJECT_WIDTH 24
  680. #define HTML_OBJECT_ATTRIBUTES 25
  681. #define HTML_OL_CLASS 0
  682. #define HTML_OL_CLEAR 1
  683. #define HTML_OL_COMPACT 2
  684. #define HTML_OL_CONTINUE 3
  685. #define HTML_OL_DIR 4
  686. #define HTML_OL_ID 5
  687. #define HTML_OL_LANG 6
  688. #define HTML_OL_SEQNUM 7
  689. #define HTML_OL_START 8
  690. #define HTML_OL_STYLE 9
  691. #define HTML_OL_TITLE 10
  692. #define HTML_OL_TYPE 11
  693. #define HTML_OL_ATTRIBUTES 12
  694. #define HTML_OPTION_CLASS 0
  695. #define HTML_OPTION_CLEAR 1
  696. #define HTML_OPTION_DIR 2
  697. #define HTML_OPTION_DISABLED 3
  698. #define HTML_OPTION_ERROR 4
  699. #define HTML_OPTION_ID 5
  700. #define HTML_OPTION_LANG 6
  701. #define HTML_OPTION_SELECTED 7
  702. #define HTML_OPTION_SHAPE 8
  703. #define HTML_OPTION_STYLE 9
  704. #define HTML_OPTION_TITLE 10
  705. #define HTML_OPTION_VALUE 11
  706. #define HTML_OPTION_ATTRIBUTES 12
  707. #define HTML_OVERLAY_CLASS 0
  708. #define HTML_OVERLAY_HEIGHT 1
  709. #define HTML_OVERLAY_ID 2
  710. #define HTML_OVERLAY_IMAGEMAP 3
  711. #define HTML_OVERLAY_MD 4
  712. #define HTML_OVERLAY_SRC 5
  713. #define HTML_OVERLAY_STYLE 6
  714. #define HTML_OVERLAY_TITLE 7
  715. #define HTML_OVERLAY_UNITS 8
  716. #define HTML_OVERLAY_WIDTH 9
  717. #define HTML_OVERLAY_X 10
  718. #define HTML_OVERLAY_Y 11
  719. #define HTML_OVERLAY_ATTRIBUTES 12
  720. #define HTML_P_ALIGN 0
  721. #define HTML_P_CLASS 1
  722. #define HTML_P_CLEAR 2
  723. #define HTML_P_DIR 3
  724. #define HTML_P_ID 4
  725. #define HTML_P_LANG 5
  726. #define HTML_P_NOWRAP 6
  727. #define HTML_P_STYLE 7
  728. #define HTML_P_TITLE 8
  729. #define HTML_P_ATTRIBUTES 9
  730. #define HTML_PARAM_ACCEPT 0
  731. #define HTML_PARAM_ACCEPT_CHARSET 1
  732. #define HTML_PARAM_ACCEPT_ENCODING 2
  733. #define HTML_PARAM_CLASS 3
  734. #define HTML_PARAM_CLEAR 4
  735. #define HTML_PARAM_DATA 5
  736. #define HTML_PARAM_DIR 6
  737. #define HTML_PARAM_ID 7
  738. #define HTML_PARAM_LANG 8
  739. #define HTML_PARAM_NAME 9
  740. #define HTML_PARAM_OBJECT 10
  741. #define HTML_PARAM_REF 11
  742. #define HTML_PARAM_STYLE 12
  743. #define HTML_PARAM_TITLE 13
  744. #define HTML_PARAM_TYPE 14
  745. #define HTML_PARAM_VALUE 15
  746. #define HTML_PARAM_VALUEREF 16 /* Use VALUETYPE (DATA|REF|OBJECT). - FM */
  747. #define HTML_PARAM_VALUETYPE 17
  748. #define HTML_PARAM_ATTRIBUTES 18
  749. #define HTML_SCRIPT_CLASS 0
  750. #define HTML_SCRIPT_CLEAR 1
  751. #define HTML_SCRIPT_DIR 2
  752. #define HTML_SCRIPT_EVENT 3
  753. #define HTML_SCRIPT_FOR 4
  754. #define HTML_SCRIPT_ID 5
  755. #define HTML_SCRIPT_LANG 6
  756. #define HTML_SCRIPT_LANGUAGE 7
  757. #define HTML_SCRIPT_NAME 8
  758. #define HTML_SCRIPT_SCRIPTENGINE 9
  759. #define HTML_SCRIPT_SRC 10
  760. #define HTML_SCRIPT_STYLE 11
  761. #define HTML_SCRIPT_TITLE 12
  762. #define HTML_SCRIPT_TYPE 13
  763. #define HTML_SCRIPT_ATTRIBUTES 14
  764. #define HTML_SELECT_ALIGN 0
  765. #define HTML_SELECT_CLASS 1
  766. #define HTML_SELECT_CLEAR 2
  767. #define HTML_SELECT_DIR 3
  768. #define HTML_SELECT_DISABLED 4
  769. #define HTML_SELECT_ERROR 5
  770. #define HTML_SELECT_HEIGHT 6
  771. #define HTML_SELECT_ID 7
  772. #define HTML_SELECT_LANG 8
  773. #define HTML_SELECT_MD 9
  774. #define HTML_SELECT_MULTIPLE 10
  775. #define HTML_SELECT_NAME 11
  776. #define HTML_SELECT_NOTAB 12
  777. #define HTML_SELECT_ONBLUR 13
  778. #define HTML_SELECT_ONCHANGE 14
  779. #define HTML_SELECT_ONFOCUS 15
  780. #define HTML_SELECT_SIZE 16
  781. #define HTML_SELECT_STYLE 17
  782. #define HTML_SELECT_TABINDEX 18
  783. #define HTML_SELECT_TITLE 19
  784. #define HTML_SELECT_UNITS 20
  785. #define HTML_SELECT_WIDTH 21
  786. #define HTML_SELECT_ATTRIBUTES 22
  787. #define HTML_STYLE_DIR 0
  788. #define HTML_STYLE_LANG 1
  789. #define HTML_STYLE_NOTATION 2
  790. #define HTML_STYLE_TITLE 3
  791. #define HTML_STYLE_ATTRIBUTES 4
  792. #define HTML_TAB_ALIGN 0
  793. #define HTML_TAB_CLASS 1
  794. #define HTML_TAB_CLEAR 2
  795. #define HTML_TAB_DIR 3
  796. #define HTML_TAB_DP 4
  797. #define HTML_TAB_ID 5
  798. #define HTML_TAB_INDENT 6
  799. #define HTML_TAB_LANG 7
  800. #define HTML_TAB_STYLE 8
  801. #define HTML_TAB_TITLE 9
  802. #define HTML_TAB_TO 10
  803. #define HTML_TAB_ATTRIBUTES 11
  804. #define HTML_TABLE_ALIGN 0
  805. #define HTML_TABLE_BACKGROUND 1
  806. #define HTML_TABLE_BORDER 2
  807. #define HTML_TABLE_CELLPADDING 3
  808. #define HTML_TABLE_CELLSPACING 4
  809. #define HTML_TABLE_CLASS 5
  810. #define HTML_TABLE_CLEAR 6
  811. #define HTML_TABLE_COLS 7
  812. #define HTML_TABLE_COLSPEC 8
  813. #define HTML_TABLE_DIR 9
  814. #define HTML_TABLE_DP 10
  815. #define HTML_TABLE_FRAME 11
  816. #define HTML_TABLE_ID 12
  817. #define HTML_TABLE_LANG 13
  818. #define HTML_TABLE_NOFLOW 14
  819. #define HTML_TABLE_NOWRAP 15
  820. #define HTML_TABLE_RULES 16
  821. #define HTML_TABLE_STYLE 17
  822. #define HTML_TABLE_SUMMARY 18
  823. #define HTML_TABLE_TITLE 19
  824. #define HTML_TABLE_UNITS 20
  825. #define HTML_TABLE_WIDTH 21
  826. #define HTML_TABLE_ATTRIBUTES 22
  827. #define HTML_TD_ALIGN 0
  828. #define HTML_TD_AXES 1
  829. #define HTML_TD_AXIS 2
  830. #define HTML_TD_BACKGROUND 3
  831. #define HTML_TD_CHAR 4
  832. #define HTML_TD_CHAROFF 5
  833. #define HTML_TD_CLASS 6
  834. #define HTML_TD_CLEAR 7
  835. #define HTML_TD_COLSPAN 8
  836. #define HTML_TD_DIR 9
  837. #define HTML_TD_DP 10
  838. #define HTML_TD_HEIGHT 11
  839. #define HTML_TD_ID 12
  840. #define HTML_TD_LANG 13
  841. #define HTML_TD_NOWRAP 14
  842. #define HTML_TD_ROWSPAN 15
  843. #define HTML_TD_STYLE 16
  844. #define HTML_TD_TITLE 17
  845. #define HTML_TD_VALIGN 18
  846. #define HTML_TD_WIDTH 19
  847. #define HTML_TD_ATTRIBUTES 20
  848. #define HTML_TEXTAREA_ACCEPT_CHARSET 0 /* RFC 2070 HTML i18n - kw */
  849. #define HTML_TEXTAREA_ALIGN 1
  850. #define HTML_TEXTAREA_CLASS 2
  851. #define HTML_TEXTAREA_CLEAR 3
  852. #define HTML_TEXTAREA_COLS 4
  853. #define HTML_TEXTAREA_DIR 5
  854. #define HTML_TEXTAREA_DISABLED 6
  855. #define HTML_TEXTAREA_ERROR 7
  856. #define HTML_TEXTAREA_ID 8
  857. #define HTML_TEXTAREA_LANG 9
  858. #define HTML_TEXTAREA_NAME 10
  859. #define HTML_TEXTAREA_NOTAB 11
  860. #define HTML_TEXTAREA_ONBLUR 12
  861. #define HTML_TEXTAREA_ONCHANGE 13
  862. #define HTML_TEXTAREA_ONFOCUS 14
  863. #define HTML_TEXTAREA_ONSELECT 15
  864. #define HTML_TEXTAREA_ROWS 16
  865. #define HTML_TEXTAREA_STYLE 17
  866. #define HTML_TEXTAREA_TABINDEX 18
  867. #define HTML_TEXTAREA_TITLE 19
  868. #define HTML_TEXTAREA_ATTRIBUTES 20
  869. #define HTML_TR_ALIGN 0
  870. #define HTML_TR_CHAR 1
  871. #define HTML_TR_CHAROFF 2
  872. #define HTML_TR_CLASS 3
  873. #define HTML_TR_CLEAR 4
  874. #define HTML_TR_DIR 5
  875. #define HTML_TR_DP 6
  876. #define HTML_TR_ID 7
  877. #define HTML_TR_LANG 8
  878. #define HTML_TR_NOWRAP 9
  879. #define HTML_TR_STYLE 10
  880. #define HTML_TR_TITLE 11
  881. #define HTML_TR_VALIGN 12
  882. #define HTML_TR_ATTRIBUTES 13
  883. #define HTML_UL_CLASS 0
  884. #define HTML_UL_CLEAR 1
  885. #define HTML_UL_COMPACT 2
  886. #define HTML_UL_DINGBAT 3
  887. #define HTML_UL_DIR 4
  888. #define HTML_UL_ID 5
  889. #define HTML_UL_LANG 6
  890. #define HTML_UL_MD 7
  891. #define HTML_UL_PLAIN 8
  892. #define HTML_UL_SRC 9
  893. #define HTML_UL_STYLE 10
  894. #define HTML_UL_TITLE 11
  895. #define HTML_UL_TYPE 12
  896. #define HTML_UL_WRAP 13
  897. #define HTML_UL_ATTRIBUTES 14
  898. #ifdef USE_PRETTYSRC
  899. /* values of HTML attributes' types */
  900. #define HTMLA_NORMAL 0 /* nothing specific */
  901. #define HTMLA_ANAME 1 /* anchor name - 'id' or a's 'name' */
  902. #define HTMLA_HREF 2 /* href */
  903. #define HTMLA_CLASS 4 /* class name. */
  904. #define HTMLA_AUXCLASS 8 /* attribute, the value of which also designates
  905. a class name */
  906. #endif
  907. extern const SGML_dtd HTML_dtd;
  908. extern void HTSwitchDTD(int new_flag);
  909. extern HTTag HTTag_unrecognized;
  910. extern HTTag HTTag_mixedObject;
  911. /*
  912. Start anchor element
  913. It is kinda convenient to have a particular routine for starting an anchor
  914. element, as everything else for HTML is simple anyway.
  915. ON ENTRY
  916. targetstream points to a structured stream object.
  917. name and href point to attribute strings or are NULL if the attribute is
  918. to be omitted.
  919. */
  920. extern void HTStartAnchor(HTStructured * targetstream, const char *name,
  921. const char *href);
  922. extern void HTStartAnchor5(HTStructured * targetstream, const char *name,
  923. const char *href,
  924. const char *linktype,
  925. int tag_charset);
  926. /*
  927. Start IsIndex element - FM
  928. It is kinda convenient to have a particular routine for starting an IsIndex
  929. element with the prompt and/or href (action) attributes specified.
  930. ON ENTRY
  931. targetstream points to a structured stream object.
  932. prompt and href point to attribute strings or are NULL if the attribute is
  933. to be omitted.
  934. */
  935. extern void HTStartIsIndex(HTStructured * targetstream, const char *prompt,
  936. const char *href);
  937. #ifdef __cplusplus
  938. }
  939. #endif
  940. #endif /* HTMLDTD_H */