Annotation of libwww/Library/src/HTMLPDTD.html, revision 2.26
2.7 frystyk 1: <HTML>
2: <HEAD>
2.23 frystyk 3: <TITLE>W3C Sample Code Library libwww HTML DTD</TITLE>
2.22 frystyk 4: <!-- Changed by: Henrik Frystyk Nielsen, 28-Jun-1996 -->
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.26 ! frystyk 25: HREF="http://www.w3.org/Library/">
2.23 frystyk 26: W3C Sample Code 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.21 frystyk 43: #define HTML_ENTITIES 67
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,
2.25 frystyk 109: HTML_META,
2.1 timbl 110: HTML_NEXTID,
111: HTML_NOTE,
112: HTML_OL,
113: HTML_OPTION,
114: HTML_OVER,
115: HTML_P,
116: HTML_PERSON,
117: HTML_PLAINTEXT,
118: HTML_PRE,
119: HTML_Q,
120: HTML_QUOTE,
121: HTML_RENDER,
122: HTML_REMOVED,
123: HTML_S,
124: HTML_SAMP,
125: HTML_SELECT,
126: HTML_STRONG,
127: HTML_SUB,
128: HTML_SUP,
129: HTML_TAB,
130: HTML_TABLE,
131: HTML_TD,
132: HTML_TEXTAREA,
133: HTML_TH,
134: HTML_TITLE,
135: HTML_TR,
136: HTML_TT,
137: HTML_U,
138: HTML_UL,
139: HTML_VAR,
2.25 frystyk 140: HTML_XMP
141: }
2.1 timbl 142: HTMLElement;
143:
2.25 frystyk 144: #define HTMLP_ELEMENTS 86
2.1 timbl 145:
2.6 timbl 146: </PRE><H2>Attribute numbers</H2>Identifier is
147: HTML_<element>_<attribute>. These must match the tables in <A
148: HREF="HTMLPDTD.c" NAME="z2">HTMLPDTD.c</A> ! <PRE>
149: #define HTML_A_EFFECT 0
2.1 timbl 150: #define HTML_A_HREF 1
151: #define HTML_A_ID 2
152: #define HTML_A_METHODS 3
153: #define HTML_A_NAME 4
154: #define HTML_A_PRINT 5
155: #define HTML_A_REL 6
156: #define HTML_A_REV 7
157: #define HTML_A_SHAPE 8
158: #define HTML_A_TITLE 9
159: #define HTML_A_ATTRIBUTES 10
160:
2.22 frystyk 161: #define HTML_BASE_HREF 0
2.1 timbl 162: #define HTML_BASE_ATTRIBUTES 1
2.11 frystyk 163:
164: #define HTML_FORM_ACTION 0 /* WSM bug fix, added these five */
165: #define HTML_FORM_ID 1
166: #define HTML_FORM_INDEX 2
167: #define HTML_FORM_LANG 3
168: #define HTML_FORM_METHOD 4
2.1 timbl 169: #define HTML_FORM_ATTRIBUTES 5
170:
171: #define HTML_FIG_ATTRIBUTES 6
172:
173: #define HTML_GEN_ATTRIBUTES 3
174:
175: #define HTML_HTMLPLUS_ATTRIBUTES 2
176:
177: #define HTML_IMAGE_ATTRIBUTES 5
178:
179: #define HTML_CHANGED_ATTRIBUTES 2
2.3 frystyk 180: #define HTML_DL_ATTRIBUTES 3
2.1 timbl 181:
182: #define DL_COMPACT 0
183:
184: #define HTML_IMG_ALIGN 0
185: #define HTML_IMG_ALT 1
186: #define HTML_IMG_ISMAP 2 /* Obsolete but supported */
187: #define HTML_IMG_SEETHRU 3
188:
189: #define HTML_IMG_SRC 4
190:
191: #define HTML_IMG_ATTRIBUTES 5
192:
2.2 timbl 193: #define HTML_INPUT_ALIGN 0
194: #define HTML_INPUT_CHECKED 1
195: #define HTML_INPUT_DISABLED 2
196: #define HTML_INPUT_ERROR 3
197: #define HTML_INPUT_MAX 4
198: #define HTML_INPUT_MIN 5
199: #define HTML_INPUT_NAME 6
200: #define HTML_INPUT_SIZE 7
201: #define HTML_INPUT_SRC 8
202: #define HTML_INPUT_TYPE 9
203: #define HTML_INPUT_VALUE 10
204: #define HTML_INPUT_ATTRIBUTES 11
2.1 timbl 205:
206: #define HTML_L_ATTRIBUTES 4
207:
208: #define HTML_LI_ATTRIBUTES 4
2.24 frystyk 209:
2.1 timbl 210: #define HTML_LIST_ATTRIBUTES 4
211:
2.24 frystyk 212: #define HTML_LINK_CHARSET 0
213: #define HTML_LINK_HREF 1
214: #define HTML_LINK_HREFLANG 2
215: #define HTML_LINK_MEDIA 3
216: #define HTML_LINK_REL 4
217: #define HTML_LINK_REV 5
218: #define HTML_LINK_TYPE 6
219: #define HTML_LINK_ATTRIBUTES 7
2.1 timbl 220:
221: #define HTML_ID_ATTRIBUTE 1
222:
2.25 frystyk 223: #define HTML_META_CONTENT 0
224: #define HTML_META_HTTP_EQUIV 1
225: #define HTML_META_NAME 2
226: #define HTML_META_SCHEME 3
227: #define HTML_META_ATTRIBUTES 4
228:
2.1 timbl 229: #define HTML_NEXTID_ATTRIBUTES 1
230: #define HTML_NEXTID_N 0
231:
232: #define HTML_NOTE_ATTRIBUTES 4
233:
2.11 frystyk 234: #define HTML_OPTION_DISABLED 0 /* WSM bug fix, added these 4 */
235: #define HTML_OPTION_LANG 1
236: #define HTML_OPTION_SELECTED 2
237: #define HTML_OPTION_ATTRIBUTES 3
2.1 timbl 238:
239: /* #define HTML_PRE_WIDTH 0
240: #define HTML_PRE_ATTRIBUTES 1
241: */
242: #define HTML_RENDER_ATTRIBUTES 2
243:
2.11 frystyk 244: #define HTML_SELECT_ERROR 0 /* WSM bug fix, added these 5 */
245: #define HTML_SELECT_LANG 1
246: #define HTML_SELECT_MULTIPLE 2
247: #define HTML_SELECT_NAME 3
248: #define HTML_SELECT_SIZE 4
249: #define HTML_SELECT_ATTRIBUTES 5
250:
2.1 timbl 251: #define HTML_TAB_ATTRIBUTES 2
252: #define HTML_TABLE_ATTRIBUTES 4
253: #define HTML_TD_ATTRIBUTES 4
254:
2.11 frystyk 255: #define HTML_TEXTAREA_COLS 0
256: #define HTML_TEXTAREA_DISABLED 1
257: #define HTML_TEXTAREA_ERROR 2
258: #define HTML_TEXTAREA_LANG 3
259: #define HTML_TEXTAREA_NAME 4
260: #define HTML_TEXTAREA_ROWS 5
2.1 timbl 261: #define HTML_TEXTAREA_ATTRIBUTES 6
262:
263: #define HTML_TH_ATTRIBUTES 4
264:
265: #define HTML_UL_ATTRIBUTES 6
266:
2.18 frystyk 267: extern const SGML_dtd HTMLP_dtd;
2.1 timbl 268:
269:
2.6 timbl 270: </PRE><H2>Start anchor element</H2>It is kinda convenient to have a particular
271: routine for starting an anchor element,
272: as everything else for HTML is simple anyway. <H3>On entry</H3>targetstream
273: poinst to a structured stream object.<P>name and href point to attribute
274: strings or are NULL if the attribute is to be omitted. <PRE>
2.17 frystyk 275: extern void HTStartAnchor (
2.1 timbl 276: HTStructured * targetstream,
2.18 frystyk 277: const char * name,
278: const char * href);
2.1 timbl 279:
2.6 timbl 280:
281: </PRE><H2>Put image element</H2>Hopefully as useful as HTStartAnchor. <H3>
282: On entry</H3>targetstream point to a structured stream object.<P>src,
283: alt and align are omitted if they are set to NULL. <PRE>
2.17 frystyk 284: extern void HTMLPutImg (HTStructured *obj,
2.18 frystyk 285: const char *src,
286: const char *alt,
287: const char *align);
2.1 timbl 288:
2.6 timbl 289: </PRE><H2>Specify next ID to be used</H2>This is another convenience routine,
290: for specifying the next ID to be used by an editor in the series z1. z2,...
291: <PRE>
2.17 frystyk 292: extern void HTNextID (HTStructured * targetStream,
2.18 frystyk 293: const char * s);
2.1 timbl 294:
295: #endif /* HTMLDTD_H */
296:
2.20 frystyk 297: </PRE>
298:
299: <HR>
300: <ADDRESS>
2.26 ! frystyk 301: @(#) $Id: HTMLPDTD.html,v 2.25 1998/02/25 20:48:34 frystyk Exp $
2.20 frystyk 302: </ADDRESS>
303: </BODY>
304: </HTML>
Webmaster