Annotation of libwww/Library/src/HTMLPDTD.html, revision 2.29
2.7 frystyk 1: <HTML>
2: <HEAD>
2.28 frystyk 3: <!-- Changed by: Henrik Frystyk Nielsen, 28-Jun-1996 -->
4: <TITLE>W3C Sample Code Library libwww HTML DTD</TITLE>
2.7 frystyk 5: </HEAD>
6: <BODY>
2.28 frystyk 7: <H1>
8: HTML Plus DTD - Software Interface
9: </H1>
2.7 frystyk 10: <PRE>
11: /*
2.12 frystyk 12: ** (c) COPYRIGHT MIT 1995.
2.7 frystyk 13: ** Please first read the full copyright statement in the file COPYRIGH.
14: */
15: </PRE>
2.28 frystyk 16: <P>
17: SGML purists should excuse the use of the term "DTD" in this file to represent
18: DTD-related information which is not exactly a DTD itself. The C modular
19: structure doesn't work very well here, as the dtd is partly in the .h and
20: partly in the .c which are not very independent. <EM>Tant pis!</EM> There
21: are a couple of HTML-specific utility routines also defined.
22: <P>
23: This module is a part of the <A HREF="http://www.w3.org/Library/"> W3C Sample
24: Code Library</A>.
2.6 timbl 25: <PRE>
26: #ifndef HTMLDTD_H
2.1 timbl 27: #define HTMLDTD_H
28:
2.28 frystyk 29: #include "<A HREF="HTStruct.html">HTStruct.h</A>"
30: #include "<A HREF="SGML.html">SGML.h</A>"
2.9 frystyk 31: </PRE>
2.28 frystyk 32: <H2>
33: Number of HTML Entities
34: </H2>
35: <P>
36: The entity names are defined in the C file. This gives the number of them.
37: Must Match all tables by element!
2.9 frystyk 38: <PRE>
2.21 frystyk 39: #define HTML_ENTITIES 67
2.9 frystyk 40: </PRE>
2.28 frystyk 41: <H2>
42: HTML Element Enumeration
43: </H2>
44: <P>
45: These include tables in <A HREF="HTMLPDTD.c" NAME="z1">HTMLPDTD.c</A> and
46: code in <A HREF="HTML.c" NAME="z0">HTML.c</A>. Note that not everything from
47: <A HREF="http://www.w3.org/TR/REC-html40">HTML 4.0</A> is there!
2.9 frystyk 48: <PRE>
2.6 timbl 49: typedef enum _HTMLElement {
2.28 frystyk 50: HTML_A = 0,
2.1 timbl 51: HTML_ABBREV,
52: HTML_ABSTRACT,
53: HTML_ACRONYM,
54: HTML_ADDED,
55: HTML_ADDRESS,
2.28 frystyk 56: HTML_AREA,
2.1 timbl 57: HTML_ARG,
58: HTML_B,
59: HTML_BASE,
2.29 ! frystyk 60: HTML_BIG,
2.1 timbl 61: HTML_BLOCKQUOTE,
62: HTML_BODY,
63: HTML_BOX,
64: HTML_BR,
65: HTML_BYLINE,
66: HTML_CAPTION,
67: HTML_CHANGED,
68: HTML_CITE,
69: HTML_CMD,
70: HTML_CODE,
71: HTML_COMMENT,
72: HTML_DD,
73: HTML_DFN,
74: HTML_DIR,
2.29 ! frystyk 75: HTML_DIV,
2.1 timbl 76: HTML_DL,
77: HTML_DT,
78: HTML_EM,
79: HTML_FIG,
80: HTML_FOOTNOTE,
81: HTML_FORM,
2.27 frystyk 82: HTML_FRAME,
83: HTML_FRAMESET,
2.1 timbl 84: HTML_H1,
85: HTML_H2,
86: HTML_H3,
87: HTML_H4,
88: HTML_H5,
89: HTML_H6,
90: HTML_H7,
91: HTML_HEAD,
92: HTML_HR,
93: HTML_HTML,
94: HTML_HTMLPLUS,
95: HTML_I,
96: HTML_IMAGE,
97: HTML_IMG,
98: HTML_INPUT,
99: HTML_ISINDEX,
100: HTML_KBD,
101: HTML_L,
102: HTML_LI,
103: HTML_LINK,
104: HTML_LISTING,
105: HTML_LIT,
2.29 ! frystyk 106: HTML_MAP,
2.1 timbl 107: HTML_MARGIN,
108: HTML_MATH,
109: HTML_MENU,
2.25 frystyk 110: HTML_META,
2.1 timbl 111: HTML_NEXTID,
2.27 frystyk 112: HTML_NOFRAMES,
2.1 timbl 113: HTML_NOTE,
2.28 frystyk 114: HTML_OBJECT,
2.1 timbl 115: HTML_OL,
116: HTML_OPTION,
117: HTML_OVER,
118: HTML_P,
119: HTML_PERSON,
120: HTML_PLAINTEXT,
121: HTML_PRE,
122: HTML_Q,
123: HTML_QUOTE,
124: HTML_RENDER,
125: HTML_REMOVED,
126: HTML_S,
127: HTML_SAMP,
128: HTML_SELECT,
2.29 ! frystyk 129: HTML_SMALL,
! 130: HTML_SPAN,
2.1 timbl 131: HTML_STRONG,
132: HTML_SUB,
133: HTML_SUP,
134: HTML_TAB,
135: HTML_TABLE,
136: HTML_TD,
137: HTML_TEXTAREA,
138: HTML_TH,
139: HTML_TITLE,
140: HTML_TR,
141: HTML_TT,
142: HTML_U,
143: HTML_UL,
144: HTML_VAR,
2.28 frystyk 145: HTML_XMP,
146: HTML_ELEMENTS /* This must be the last entry */
147: } HTMLElement;
148: </PRE>
149: <H2>
150: Element Attribute Enumerations
151: </H2>
152: <P>
153: Identifier is <TT>HTML_<element>_<attribute></TT>. These
154: <STRONG>must</STRONG> match the tables in
155: <A HREF="HTMLPDTD.c" NAME="z2">HTMLPDTD.c</A>!
156: <H3>
157: A
158: </H3>
159: <PRE>
2.6 timbl 160: #define HTML_A_EFFECT 0
2.1 timbl 161: #define HTML_A_HREF 1
162: #define HTML_A_ID 2
163: #define HTML_A_METHODS 3
164: #define HTML_A_NAME 4
165: #define HTML_A_PRINT 5
166: #define HTML_A_REL 6
167: #define HTML_A_REV 7
168: #define HTML_A_SHAPE 8
169: #define HTML_A_TITLE 9
170: #define HTML_A_ATTRIBUTES 10
2.28 frystyk 171: </PRE>
172: <H3>
173: AREA
174: </H3>
175: <PRE>
176: #define HTML_AREA_ALT 0
177: #define HTML_AREA_ACCESSKEY 1
178: #define HTML_AREA_COORDS 2
179: #define HTML_AREA_HREF 3
180: #define HTML_AREA_NOHREF 4
181: #define HTML_AREA_ONBLUR 5
182: #define HTML_AREA_ONFOCUS 6
183: #define HTML_AREA_SHAPE 7
184: #define HTML_AREA_TABINDEX 8
185: #define HTML_AREA_ATTRIBUTES 9
186: </PRE>
187: <H3>
188: BASE
189: </H3>
190: <PRE>
2.22 frystyk 191: #define HTML_BASE_HREF 0
2.1 timbl 192: #define HTML_BASE_ATTRIBUTES 1
2.28 frystyk 193: </PRE>
194: <H3>
195: BODY
196: </H3>
197: <PRE>
2.27 frystyk 198: #define HTML_BODY_BACKGROUND 0
199: #define HTML_BODY_ATTRIBUTES 1
2.28 frystyk 200: </PRE>
201: <H3>
202: FORM
203: </H3>
204: <PRE>
2.11 frystyk 205: #define HTML_FORM_ACTION 0 /* WSM bug fix, added these five */
206: #define HTML_FORM_ID 1
207: #define HTML_FORM_INDEX 2
208: #define HTML_FORM_LANG 3
209: #define HTML_FORM_METHOD 4
2.1 timbl 210: #define HTML_FORM_ATTRIBUTES 5
2.28 frystyk 211: </PRE>
212: <H3>
213: FRAME
214: </H3>
215: <PRE>
2.27 frystyk 216: #define HTML_FRAME_SRC 0
217: #define HTML_FRAME_ATTRIBUTES 1
2.28 frystyk 218: </PRE>
219: <H3>
220: FRAMESET
221: </H3>
222: <PRE>
2.27 frystyk 223: #define HTML_FRAMESET_COLS 0
224: #define HTML_FRAMESET_ROWS 1
225: #define HTML_FRAMESET_BORDER 2
226: #define HTML_FRAMESET_BORDERCOLOR 3
227: #define HTML_FRAMESET_FRAMEBORDER 4
228: #define HTML_FRAMESET_ONBLUR 5
229: #define HTML_FRAMESET_ONFOCUS 6
230: #define HTML_FRAMESET_ONLOAD 7
231: #define HTML_FRAMESET_ONUNLOAD 8
232: #define HTML_FRAMESET_ATTRIBUTES 9
2.28 frystyk 233: </PRE>
234: <H3>
235: FIG
236: </H3>
237: <PRE>
2.1 timbl 238: #define HTML_FIG_ATTRIBUTES 6
2.28 frystyk 239: </PRE>
240: <H3>
241: GEN
242: </H3>
243: <PRE>
2.1 timbl 244: #define HTML_GEN_ATTRIBUTES 3
2.28 frystyk 245: </PRE>
246: <H3>
247: HTMLPLUS
248: </H3>
249: <PRE>
2.1 timbl 250: #define HTML_HTMLPLUS_ATTRIBUTES 2
2.28 frystyk 251: </PRE>
252: <H3>
253: IMAGE
254: </H3>
255: <PRE>
2.1 timbl 256: #define HTML_IMAGE_ATTRIBUTES 5
2.28 frystyk 257: </PRE>
258: <H3>
259: CHANGED
260: </H3>
261: <PRE>
2.1 timbl 262: #define HTML_CHANGED_ATTRIBUTES 2
2.28 frystyk 263: </PRE>
264: <H3>
265: DL
266: </H3>
267: <PRE>
268: #define HTML_DL_ID 0
269: #define HTML_DL_COMPACT 1
270: #define HTML_DL_INDEX 2
2.3 frystyk 271: #define HTML_DL_ATTRIBUTES 3
2.28 frystyk 272: </PRE>
273: <H3>
274: IMG
275: </H3>
276: <PRE>
2.1 timbl 277: #define HTML_IMG_ALIGN 0
278: #define HTML_IMG_ALT 1
279: #define HTML_IMG_ISMAP 2 /* Obsolete but supported */
2.27 frystyk 280: #define HTML_IMG_LOWSRC 3
281: #define HTML_IMG_SEETHRU 4
282: #define HTML_IMG_SRC 5
283: #define HTML_IMG_ATTRIBUTES 6
2.28 frystyk 284: </PRE>
285: <H3>
286: INPUT
287: </H3>
288: <PRE>
2.2 timbl 289: #define HTML_INPUT_ALIGN 0
290: #define HTML_INPUT_CHECKED 1
291: #define HTML_INPUT_DISABLED 2
292: #define HTML_INPUT_ERROR 3
293: #define HTML_INPUT_MAX 4
294: #define HTML_INPUT_MIN 5
295: #define HTML_INPUT_NAME 6
296: #define HTML_INPUT_SIZE 7
297: #define HTML_INPUT_SRC 8
298: #define HTML_INPUT_TYPE 9
299: #define HTML_INPUT_VALUE 10
300: #define HTML_INPUT_ATTRIBUTES 11
2.28 frystyk 301: </PRE>
302: <H3>
303: L
304: </H3>
305: <PRE>
2.1 timbl 306: #define HTML_L_ATTRIBUTES 4
2.28 frystyk 307: </PRE>
308: <H3>
309: LI
310: </H3>
311: <PRE>
2.1 timbl 312: #define HTML_LI_ATTRIBUTES 4
2.28 frystyk 313: </PRE>
314: <H3>
315: LIST
316: </H3>
317: <PRE>
2.1 timbl 318: #define HTML_LIST_ATTRIBUTES 4
2.28 frystyk 319: </PRE>
320: <H3>
321: LINK
322: </H3>
323: <PRE>
2.24 frystyk 324: #define HTML_LINK_CHARSET 0
325: #define HTML_LINK_HREF 1
326: #define HTML_LINK_HREFLANG 2
327: #define HTML_LINK_MEDIA 3
328: #define HTML_LINK_REL 4
329: #define HTML_LINK_REV 5
330: #define HTML_LINK_TYPE 6
331: #define HTML_LINK_ATTRIBUTES 7
2.28 frystyk 332: </PRE>
333: <H3>
334: ID
335: </H3>
336: <PRE>
2.1 timbl 337: #define HTML_ID_ATTRIBUTE 1
2.28 frystyk 338: </PRE>
339: <H3>
2.29 ! frystyk 340: MAP
! 341: </H3>
! 342: <PRE>
! 343: #define HTML_MAP_NAME 0
! 344: #define HTML_MAP_ATTRIBUTES 1
! 345: </PRE>
! 346: <H3>
2.28 frystyk 347: META
348: </H3>
349: <PRE>
2.25 frystyk 350: #define HTML_META_CONTENT 0
351: #define HTML_META_HTTP_EQUIV 1
352: #define HTML_META_NAME 2
353: #define HTML_META_SCHEME 3
354: #define HTML_META_ATTRIBUTES 4
2.28 frystyk 355: </PRE>
356: <H3>
357: NEXTID
358: </H3>
359: <PRE>
2.1 timbl 360: #define HTML_NEXTID_ATTRIBUTES 1
361: #define HTML_NEXTID_N 0
2.28 frystyk 362: </PRE>
363: <H3>
364: NOTE
365: </H3>
366: <PRE>
2.1 timbl 367: #define HTML_NOTE_ATTRIBUTES 4
2.28 frystyk 368: </PRE>
369: <H3>
370: OBJECT
371: </H3>
372: <PRE>
373: #define HTML_OBJECT_ARCHIVE 0
374: #define HTML_OBJECT_CLASSID 1
375: #define HTML_OBJECT_CODEBASE 2
376: #define HTML_OBJECT_CODETYPE 3
377: #define HTML_OBJECT_DATA 4
378: #define HTML_OBJECT_DECLARE 5
379: #define HTML_OBJECT_HIGHT 6
380: #define HTML_OBJECT_NAME 7
381: #define HTML_OBJECT_STANDBY 8
382: #define HTML_OBJECT_TABINDEX 9
383: #define HTML_OBJECT_TYPE 10
384: #define HTML_OBJECT_USEMAP 11
385: #define HTML_OBJECT_WIDTH 12
386: #define HTML_OBJECT_ATTRIBUTES 13
387: </PRE>
388: <H3>
389: OPTION
390: </H3>
391: <PRE>
2.11 frystyk 392: #define HTML_OPTION_DISABLED 0 /* WSM bug fix, added these 4 */
393: #define HTML_OPTION_LANG 1
394: #define HTML_OPTION_SELECTED 2
395: #define HTML_OPTION_ATTRIBUTES 3
2.28 frystyk 396: </PRE>
397: <H3>
398: RENDER
399: </H3>
400: <PRE>
2.1 timbl 401: #define HTML_RENDER_ATTRIBUTES 2
2.28 frystyk 402: </PRE>
403: <H3>
404: SELECT
405: </H3>
406: <PRE>
2.11 frystyk 407: #define HTML_SELECT_ERROR 0 /* WSM bug fix, added these 5 */
408: #define HTML_SELECT_LANG 1
409: #define HTML_SELECT_MULTIPLE 2
410: #define HTML_SELECT_NAME 3
411: #define HTML_SELECT_SIZE 4
412: #define HTML_SELECT_ATTRIBUTES 5
2.28 frystyk 413: </PRE>
414: <H3>
415: TAB
416: </H3>
417: <PRE>
2.1 timbl 418: #define HTML_TAB_ATTRIBUTES 2
2.28 frystyk 419: </PRE>
420: <H3>
421: TABLE
422: </H3>
423: <PRE>
2.1 timbl 424: #define HTML_TABLE_ATTRIBUTES 4
2.28 frystyk 425: </PRE>
426: <H3>
427: TD
428: </H3>
429: <PRE>
2.1 timbl 430: #define HTML_TD_ATTRIBUTES 4
2.28 frystyk 431: </PRE>
432: <H3>
433: TEXTAREA
434: </H3>
435: <PRE>
436: #define HTML_TEXTAREA_COLS 0
437: #define HTML_TEXTAREA_DISABLED 1
438: #define HTML_TEXTAREA_ERROR 2
439: #define HTML_TEXTAREA_LANG 3
440: #define HTML_TEXTAREA_NAME 4
441: #define HTML_TEXTAREA_ROWS 5
2.1 timbl 442: #define HTML_TEXTAREA_ATTRIBUTES 6
2.28 frystyk 443: </PRE>
444: <H3>
445: TH
446: </H3>
447: <PRE>
2.1 timbl 448: #define HTML_TH_ATTRIBUTES 4
2.28 frystyk 449: </PRE>
450: <H3>
451: UL
452: </H3>
453: <PRE>
2.1 timbl 454: #define HTML_UL_ATTRIBUTES 6
2.28 frystyk 455: </PRE>
456: <H2>
457: The C Representation of the SGML DTD
458: </H2>
459: <PRE>
460: extern SGML_dtd * HTML_dtd (void);
461: extern BOOL HTML_setDtd (const SGML_dtd * dtd);
462: </PRE>
463: <H2>
464: Utitity Functions
465: </H2>
466: <H3>
467: Start anchor element
468: </H3>
469: <P>
470: It is kinda convenient to have a particular routine for starting an anchor
471: element, as everything else for HTML is simple anyway.
472: <PRE>
2.17 frystyk 473: extern void HTStartAnchor (
2.1 timbl 474: HTStructured * targetstream,
2.18 frystyk 475: const char * name,
476: const char * href);
2.28 frystyk 477: </PRE>
478: <H3>
479: Put image element
480: </H3>
481: <P>
482: This is the same idea but for images
483: <PRE>
2.17 frystyk 484: extern void HTMLPutImg (HTStructured *obj,
2.18 frystyk 485: const char *src,
486: const char *alt,
487: const char *align);
2.1 timbl 488:
2.28 frystyk 489: </PRE>
490: <H3>
491: Specify next ID to be used
492: </H3>
493: <P>
494: This is another convenience routine, for specifying the next ID to be used
495: by an editor in the series z1. z2,...
496: <PRE>
497: extern void HTNextID (HTStructured * targetStream, const char * s);
498: </PRE>
2.6 timbl 499: <PRE>
2.1 timbl 500: #endif /* HTMLDTD_H */
2.20 frystyk 501: </PRE>
2.28 frystyk 502: <P>
503: <HR>
2.20 frystyk 504: <ADDRESS>
2.29 ! frystyk 505: @(#) $Id: HTMLPDTD.html,v 2.28 1999/01/06 15:38:47 frystyk Exp $
2.20 frystyk 506: </ADDRESS>
2.28 frystyk 507: </BODY></HTML>
Webmaster