Annotation of libwww/Library/src/HTMLPDTD.html, revision 2.19
2.7 frystyk 1: <HTML>
2: <HEAD>
2.19 ! frystyk 3: <TITLE>W3C Reference Library libwww HTML DTD</TITLE>
2.17 frystyk 4: <!-- Changed by: Henrik Frystyk Nielsen, 19-Nov-1995 -->
2.7 frystyk 5: </HEAD>
6: <BODY>
7:
8: <H1>HTML Plus DTD - Software Interface</H1>
9:
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>
16:
17: SGML purists should excuse the use of the term "DTD" in this file to
18: represent DTD-related information which is not exactly a DTD
19: itself. The C modular structure doesn't work very well here, as the
20: dtd is partly in the .h and partly in the .c which are not very
21: independent. <EM>Tant pis!</EM> There are a couple of HTML-specific
22: utility routines also defined. <P>
23:
24: This module is a part of the <A
2.16 frystyk 25: HREF="http://www.w3.org/pub/WWW/Library/">
2.13 frystyk 26: W3C Reference Library</A>.
2.7 frystyk 27:
2.6 timbl 28: <PRE>
29: #ifndef HTMLDTD_H
2.1 timbl 30: #define HTMLDTD_H
31:
2.15 frystyk 32: #include "HTStruct.h"
2.9 frystyk 33: #include "SGML.h"
34: </PRE>
35:
36: <H2>Entity numbers</H2>
2.6 timbl 37:
38: The entity names are defined in the C file. This gives the number of them.
2.9 frystyk 39:
2.10 frystyk 40: <H2>Element Numbers</H2>
41:
2.9 frystyk 42: <PRE>
2.6 timbl 43: #define HTML_ENTITIES 66
2.9 frystyk 44: </PRE>
2.6 timbl 45:
2.9 frystyk 46: Must Match all tables by element! These include tables in <A
47: HREF="HTMLPDTD.c" NAME="z1">HTMLPDTD.c</A> and code in <A
48: HREF="HTML.c" NAME="z0">HTML.c</A>.<P>
2.1 timbl 49:
2.9 frystyk 50: Differences from Internet Draft 00: HTML, H7,PLAINTEXT LISTINGand XMP
51: left in.
2.6 timbl 52:
2.9 frystyk 53: <PRE>
2.6 timbl 54: typedef enum _HTMLElement {
2.1 timbl 55: HTML_A,
56: HTML_ABBREV,
57: HTML_ABSTRACT,
58: HTML_ACRONYM,
59: HTML_ADDED,
60: HTML_ADDRESS,
61: HTML_ARG,
62: HTML_B,
63: HTML_BASE,
64: HTML_BLOCKQUOTE,
65: HTML_BODY,
66: HTML_BOX,
67: HTML_BR,
68: HTML_BYLINE,
69: HTML_CAPTION,
70: HTML_CHANGED,
71: HTML_CITE,
72: HTML_CMD,
73: HTML_CODE,
74: HTML_COMMENT,
75: HTML_DD,
76: HTML_DFN,
77: HTML_DIR,
78: HTML_DL,
79: HTML_DT,
80: HTML_EM,
81: HTML_FIG,
82: HTML_FOOTNOTE,
83: HTML_FORM,
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,
106: HTML_MARGIN,
107: HTML_MATH,
108: HTML_MENU,
109: HTML_NEXTID,
110: HTML_NOTE,
111: HTML_OL,
112: HTML_OPTION,
113: HTML_OVER,
114: HTML_P,
115: HTML_PERSON,
116: HTML_PLAINTEXT,
117: HTML_PRE,
118: HTML_Q,
119: HTML_QUOTE,
120: HTML_RENDER,
121: HTML_REMOVED,
122: HTML_S,
123: HTML_SAMP,
124: HTML_SELECT,
125: HTML_STRONG,
126: HTML_SUB,
127: HTML_SUP,
128: HTML_TAB,
129: HTML_TABLE,
130: HTML_TD,
131: HTML_TEXTAREA,
132: HTML_TH,
133: HTML_TITLE,
134: HTML_TR,
135: HTML_TT,
136: HTML_U,
137: HTML_UL,
138: HTML_VAR,
139: HTML_XMP }
140: HTMLElement;
141:
142: #define HTMLP_ELEMENTS 85
143:
2.6 timbl 144: </PRE><H2>Attribute numbers</H2>Identifier is
145: HTML_<element>_<attribute>. These must match the tables in <A
146: HREF="HTMLPDTD.c" NAME="z2">HTMLPDTD.c</A> ! <PRE>
147: #define HTML_A_EFFECT 0
2.1 timbl 148: #define HTML_A_HREF 1
149: #define HTML_A_ID 2
150: #define HTML_A_METHODS 3
151: #define HTML_A_NAME 4
152: #define HTML_A_PRINT 5
153: #define HTML_A_REL 6
154: #define HTML_A_REV 7
155: #define HTML_A_SHAPE 8
156: #define HTML_A_TITLE 9
157: #define HTML_A_ATTRIBUTES 10
158:
159: #define HTML_BASE_ATTRIBUTES 1
2.11 frystyk 160:
161: #define HTML_FORM_ACTION 0 /* WSM bug fix, added these five */
162: #define HTML_FORM_ID 1
163: #define HTML_FORM_INDEX 2
164: #define HTML_FORM_LANG 3
165: #define HTML_FORM_METHOD 4
2.1 timbl 166: #define HTML_FORM_ATTRIBUTES 5
167:
168: #define HTML_FIG_ATTRIBUTES 6
169:
170: #define HTML_GEN_ATTRIBUTES 3
171:
172: #define HTML_HTMLPLUS_ATTRIBUTES 2
173:
174: #define HTML_IMAGE_ATTRIBUTES 5
175:
176: #define HTML_CHANGED_ATTRIBUTES 2
2.3 frystyk 177: #define HTML_DL_ATTRIBUTES 3
2.1 timbl 178:
179: #define DL_COMPACT 0
180:
181: #define HTML_IMG_ALIGN 0
182: #define HTML_IMG_ALT 1
183: #define HTML_IMG_ISMAP 2 /* Obsolete but supported */
184: #define HTML_IMG_SEETHRU 3
185:
186: #define HTML_IMG_SRC 4
187:
188: #define HTML_IMG_ATTRIBUTES 5
189:
2.2 timbl 190: #define HTML_INPUT_ALIGN 0
191: #define HTML_INPUT_CHECKED 1
192: #define HTML_INPUT_DISABLED 2
193: #define HTML_INPUT_ERROR 3
194: #define HTML_INPUT_MAX 4
195: #define HTML_INPUT_MIN 5
196: #define HTML_INPUT_NAME 6
197: #define HTML_INPUT_SIZE 7
198: #define HTML_INPUT_SRC 8
199: #define HTML_INPUT_TYPE 9
200: #define HTML_INPUT_VALUE 10
201: #define HTML_INPUT_ATTRIBUTES 11
2.1 timbl 202:
203: #define HTML_L_ATTRIBUTES 4
204:
205: #define HTML_LI_ATTRIBUTES 4
206: #define HTML_LIST_ATTRIBUTES 4
207:
208: #define HTML_LINK_ATTRIBUTES 5
209:
210: #define HTML_ID_ATTRIBUTE 1
211:
212: #define HTML_NEXTID_ATTRIBUTES 1
213: #define HTML_NEXTID_N 0
214:
215: #define HTML_NOTE_ATTRIBUTES 4
216:
2.11 frystyk 217: #define HTML_OPTION_DISABLED 0 /* WSM bug fix, added these 4 */
218: #define HTML_OPTION_LANG 1
219: #define HTML_OPTION_SELECTED 2
220: #define HTML_OPTION_ATTRIBUTES 3
2.1 timbl 221:
222: /* #define HTML_PRE_WIDTH 0
223: #define HTML_PRE_ATTRIBUTES 1
224: */
225: #define HTML_RENDER_ATTRIBUTES 2
226:
2.11 frystyk 227: #define HTML_SELECT_ERROR 0 /* WSM bug fix, added these 5 */
228: #define HTML_SELECT_LANG 1
229: #define HTML_SELECT_MULTIPLE 2
230: #define HTML_SELECT_NAME 3
231: #define HTML_SELECT_SIZE 4
232: #define HTML_SELECT_ATTRIBUTES 5
233:
2.1 timbl 234: #define HTML_TAB_ATTRIBUTES 2
235: #define HTML_TABLE_ATTRIBUTES 4
236: #define HTML_TD_ATTRIBUTES 4
237:
2.11 frystyk 238: #define HTML_TEXTAREA_COLS 0
239: #define HTML_TEXTAREA_DISABLED 1
240: #define HTML_TEXTAREA_ERROR 2
241: #define HTML_TEXTAREA_LANG 3
242: #define HTML_TEXTAREA_NAME 4
243: #define HTML_TEXTAREA_ROWS 5
2.1 timbl 244: #define HTML_TEXTAREA_ATTRIBUTES 6
245:
246: #define HTML_TH_ATTRIBUTES 4
247:
248: #define HTML_UL_ATTRIBUTES 6
249:
2.18 frystyk 250: extern const SGML_dtd HTMLP_dtd;
2.1 timbl 251:
252:
2.6 timbl 253: </PRE><H2>Start anchor element</H2>It is kinda convenient to have a particular
254: routine for starting an anchor element,
255: as everything else for HTML is simple anyway. <H3>On entry</H3>targetstream
256: poinst to a structured stream object.<P>name and href point to attribute
257: strings or are NULL if the attribute is to be omitted. <PRE>
2.17 frystyk 258: extern void HTStartAnchor (
2.1 timbl 259: HTStructured * targetstream,
2.18 frystyk 260: const char * name,
261: const char * href);
2.1 timbl 262:
2.6 timbl 263:
264: </PRE><H2>Put image element</H2>Hopefully as useful as HTStartAnchor. <H3>
265: On entry</H3>targetstream point to a structured stream object.<P>src,
266: alt and align are omitted if they are set to NULL. <PRE>
2.17 frystyk 267: extern void HTMLPutImg (HTStructured *obj,
2.18 frystyk 268: const char *src,
269: const char *alt,
270: const char *align);
2.1 timbl 271:
2.6 timbl 272: </PRE><H2>Specify next ID to be used</H2>This is another convenience routine,
273: for specifying the next ID to be used by an editor in the series z1. z2,...
274: <PRE>
2.17 frystyk 275: extern void HTNextID (HTStructured * targetStream,
2.18 frystyk 276: const char * s);
2.1 timbl 277:
278: #endif /* HTMLDTD_H */
279:
2.6 timbl 280: </PRE>End of module definition </BODY></HTML>
Webmaster