Annotation of libwww/Library/src/HTMLPDTD.html, revision 2.24
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.16 frystyk 25: HREF="http://www.w3.org/pub/WWW/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,
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:
2.22 frystyk 159: #define HTML_BASE_HREF 0
2.1 timbl 160: #define HTML_BASE_ATTRIBUTES 1
2.11 frystyk 161:
162: #define HTML_FORM_ACTION 0 /* WSM bug fix, added these five */
163: #define HTML_FORM_ID 1
164: #define HTML_FORM_INDEX 2
165: #define HTML_FORM_LANG 3
166: #define HTML_FORM_METHOD 4
2.1 timbl 167: #define HTML_FORM_ATTRIBUTES 5
168:
169: #define HTML_FIG_ATTRIBUTES 6
170:
171: #define HTML_GEN_ATTRIBUTES 3
172:
173: #define HTML_HTMLPLUS_ATTRIBUTES 2
174:
175: #define HTML_IMAGE_ATTRIBUTES 5
176:
177: #define HTML_CHANGED_ATTRIBUTES 2
2.3 frystyk 178: #define HTML_DL_ATTRIBUTES 3
2.1 timbl 179:
180: #define DL_COMPACT 0
181:
182: #define HTML_IMG_ALIGN 0
183: #define HTML_IMG_ALT 1
184: #define HTML_IMG_ISMAP 2 /* Obsolete but supported */
185: #define HTML_IMG_SEETHRU 3
186:
187: #define HTML_IMG_SRC 4
188:
189: #define HTML_IMG_ATTRIBUTES 5
190:
2.2 timbl 191: #define HTML_INPUT_ALIGN 0
192: #define HTML_INPUT_CHECKED 1
193: #define HTML_INPUT_DISABLED 2
194: #define HTML_INPUT_ERROR 3
195: #define HTML_INPUT_MAX 4
196: #define HTML_INPUT_MIN 5
197: #define HTML_INPUT_NAME 6
198: #define HTML_INPUT_SIZE 7
199: #define HTML_INPUT_SRC 8
200: #define HTML_INPUT_TYPE 9
201: #define HTML_INPUT_VALUE 10
202: #define HTML_INPUT_ATTRIBUTES 11
2.1 timbl 203:
204: #define HTML_L_ATTRIBUTES 4
205:
206: #define HTML_LI_ATTRIBUTES 4
2.24 ! frystyk 207:
2.1 timbl 208: #define HTML_LIST_ATTRIBUTES 4
209:
2.24 ! frystyk 210: #define HTML_LINK_CHARSET 0
! 211: #define HTML_LINK_HREF 1
! 212: #define HTML_LINK_HREFLANG 2
! 213: #define HTML_LINK_MEDIA 3
! 214: #define HTML_LINK_REL 4
! 215: #define HTML_LINK_REV 5
! 216: #define HTML_LINK_TYPE 6
! 217: #define HTML_LINK_ATTRIBUTES 7
2.1 timbl 218:
219: #define HTML_ID_ATTRIBUTE 1
220:
221: #define HTML_NEXTID_ATTRIBUTES 1
222: #define HTML_NEXTID_N 0
223:
224: #define HTML_NOTE_ATTRIBUTES 4
225:
2.11 frystyk 226: #define HTML_OPTION_DISABLED 0 /* WSM bug fix, added these 4 */
227: #define HTML_OPTION_LANG 1
228: #define HTML_OPTION_SELECTED 2
229: #define HTML_OPTION_ATTRIBUTES 3
2.1 timbl 230:
231: /* #define HTML_PRE_WIDTH 0
232: #define HTML_PRE_ATTRIBUTES 1
233: */
234: #define HTML_RENDER_ATTRIBUTES 2
235:
2.11 frystyk 236: #define HTML_SELECT_ERROR 0 /* WSM bug fix, added these 5 */
237: #define HTML_SELECT_LANG 1
238: #define HTML_SELECT_MULTIPLE 2
239: #define HTML_SELECT_NAME 3
240: #define HTML_SELECT_SIZE 4
241: #define HTML_SELECT_ATTRIBUTES 5
242:
2.1 timbl 243: #define HTML_TAB_ATTRIBUTES 2
244: #define HTML_TABLE_ATTRIBUTES 4
245: #define HTML_TD_ATTRIBUTES 4
246:
2.11 frystyk 247: #define HTML_TEXTAREA_COLS 0
248: #define HTML_TEXTAREA_DISABLED 1
249: #define HTML_TEXTAREA_ERROR 2
250: #define HTML_TEXTAREA_LANG 3
251: #define HTML_TEXTAREA_NAME 4
252: #define HTML_TEXTAREA_ROWS 5
2.1 timbl 253: #define HTML_TEXTAREA_ATTRIBUTES 6
254:
255: #define HTML_TH_ATTRIBUTES 4
256:
257: #define HTML_UL_ATTRIBUTES 6
258:
2.18 frystyk 259: extern const SGML_dtd HTMLP_dtd;
2.1 timbl 260:
261:
2.6 timbl 262: </PRE><H2>Start anchor element</H2>It is kinda convenient to have a particular
263: routine for starting an anchor element,
264: as everything else for HTML is simple anyway. <H3>On entry</H3>targetstream
265: poinst to a structured stream object.<P>name and href point to attribute
266: strings or are NULL if the attribute is to be omitted. <PRE>
2.17 frystyk 267: extern void HTStartAnchor (
2.1 timbl 268: HTStructured * targetstream,
2.18 frystyk 269: const char * name,
270: const char * href);
2.1 timbl 271:
2.6 timbl 272:
273: </PRE><H2>Put image element</H2>Hopefully as useful as HTStartAnchor. <H3>
274: On entry</H3>targetstream point to a structured stream object.<P>src,
275: alt and align are omitted if they are set to NULL. <PRE>
2.17 frystyk 276: extern void HTMLPutImg (HTStructured *obj,
2.18 frystyk 277: const char *src,
278: const char *alt,
279: const char *align);
2.1 timbl 280:
2.6 timbl 281: </PRE><H2>Specify next ID to be used</H2>This is another convenience routine,
282: for specifying the next ID to be used by an editor in the series z1. z2,...
283: <PRE>
2.17 frystyk 284: extern void HTNextID (HTStructured * targetStream,
2.18 frystyk 285: const char * s);
2.1 timbl 286:
287: #endif /* HTMLDTD_H */
288:
2.20 frystyk 289: </PRE>
290:
291: <HR>
292: <ADDRESS>
2.24 ! frystyk 293: @(#) $Id: HTMLPDTD.html,v 2.23 1997/02/16 18:42:36 frystyk Exp $
2.20 frystyk 294: </ADDRESS>
295: </BODY>
296: </HTML>
Webmaster