Annotation of libwww/Library/src/HTMLPDTD.html, revision 2.4
2.1 timbl 1: <HTML>
2: <HEAD>
3: <TITLE>The HTML PLUS DTD -- software interface in libwww</TITLE>
4: <NEXTID N="z4">
5: </HEAD>
6: <BODY>
7: <H1>HTML Plus DTD - Software Interface</H1>SGML purists should excuse the use
8: of the term "DTD" in this file to
9: represent DTD-related information
10: which is not exactly a DTD itself.<P>
11: The C modular structure doesn't work
12: very well here, as the dtd is partly
13: in the .h and partly in the .c which
14: are not very independent. Tant pis.<P>
15: There are a couple of HTML-specific
16: utility routines also defined.
17: <PRE>#ifndef HTMLDTD_H
18: #define HTMLDTD_H
19:
20: #include "HTUtils.h"
21: #include <A
22: NAME="z3" HREF="SGML.html">"SGML.h"</A>
23:
24: </PRE>
25: <H2>Element Numbers</H2>
26: <PRE>
27: </PRE>Must Match all tables by element!
28: These include tables in <A
29: NAME="z1" HREF="HTMLPDTD.c">HTMLPDTD.c</A>
30: and code in <A
31: NAME="z0" HREF="HTML.c">HTML.c</A> . <P>
32: Differences from Internet Draft 00:
33: HTML, H7,PLAINTEXT LISTINGand XMP
34: left in.
35: <PRE>typedef enum _HTMLElement {
36: HTML_A,
37: HTML_ABBREV,
38: HTML_ABSTRACT,
39: HTML_ACRONYM,
40: HTML_ADDED,
41: HTML_ADDRESS,
42: HTML_ARG,
43: HTML_B,
44: HTML_BASE,
45: HTML_BLOCKQUOTE,
46: HTML_BODY,
47: HTML_BOX,
48: HTML_BR,
49: HTML_BYLINE,
50: HTML_CAPTION,
51: HTML_CHANGED,
52: HTML_CITE,
53: HTML_CMD,
54: HTML_CODE,
55: HTML_COMMENT,
56: HTML_DD,
57: HTML_DFN,
58: HTML_DIR,
59: HTML_DL,
60: HTML_DT,
61: HTML_EM,
62: HTML_FIG,
63: HTML_FOOTNOTE,
64: HTML_FORM,
65: HTML_H1,
66: HTML_H2,
67: HTML_H3,
68: HTML_H4,
69: HTML_H5,
70: HTML_H6,
71: HTML_H7,
72: HTML_HEAD,
73: HTML_HR,
74: HTML_HTML,
75: HTML_HTMLPLUS,
76: HTML_I,
77: HTML_IMAGE,
78: HTML_IMG,
79: HTML_INPUT,
80: HTML_ISINDEX,
81: HTML_KBD,
82: HTML_L,
83: HTML_LI,
84: HTML_LINK,
85: HTML_LISTING,
86: HTML_LIT,
87: HTML_MARGIN,
88: HTML_MATH,
89: HTML_MENU,
90: HTML_NEXTID,
91: HTML_NOTE,
92: HTML_OL,
93: HTML_OPTION,
94: HTML_OVER,
95: HTML_P,
96: HTML_PERSON,
97: HTML_PLAINTEXT,
98: HTML_PRE,
99: HTML_Q,
100: HTML_QUOTE,
101: HTML_RENDER,
102: HTML_REMOVED,
103: HTML_S,
104: HTML_SAMP,
105: HTML_SELECT,
106: HTML_STRONG,
107: HTML_SUB,
108: HTML_SUP,
109: HTML_TAB,
110: HTML_TABLE,
111: HTML_TD,
112: HTML_TEXTAREA,
113: HTML_TH,
114: HTML_TITLE,
115: HTML_TR,
116: HTML_TT,
117: HTML_U,
118: HTML_UL,
119: HTML_VAR,
120: HTML_XMP }
121: HTMLElement;
122:
123: #define HTMLP_ELEMENTS 85
124:
125: </PRE>
126: <H2>Attribute numbers</H2>
127: <PRE>
128: </PRE>Identifier is HTML_<element>_<attribute>.
129: These must match the tables in <A
130: NAME="z2" HREF="HTMLPDTD.c">HTMLPDTD.c</A>
131: !
132: <PRE>#define HTML_A_EFFECT 0
133: #define HTML_A_HREF 1
134: #define HTML_A_ID 2
135: #define HTML_A_METHODS 3
136: #define HTML_A_NAME 4
137: #define HTML_A_PRINT 5
138: #define HTML_A_REL 6
139: #define HTML_A_REV 7
140: #define HTML_A_SHAPE 8
141: #define HTML_A_TITLE 9
142: #define HTML_A_ATTRIBUTES 10
143:
144: #define HTML_BASE_ATTRIBUTES 1
145: #define HTML_FORM_ATTRIBUTES 5
146:
147: #define HTML_FIG_ATTRIBUTES 6
148:
149: #define HTML_GEN_ATTRIBUTES 3
150:
151: #define HTML_HTMLPLUS_ATTRIBUTES 2
152:
153: #define HTML_IMAGE_ATTRIBUTES 5
154:
155: #define HTML_CHANGED_ATTRIBUTES 2
2.3 frystyk 156: #define HTML_DL_ATTRIBUTES 3
2.1 timbl 157:
158: #define DL_COMPACT 0
159:
160: #define HTML_IMG_ALIGN 0
161: #define HTML_IMG_ALT 1
162: #define HTML_IMG_ISMAP 2 /* Obsolete but supported */
163: #define HTML_IMG_SEETHRU 3
164:
165: #define HTML_IMG_SRC 4
166:
167: #define HTML_IMG_ATTRIBUTES 5
168:
2.2 timbl 169: #define HTML_INPUT_ALIGN 0
170: #define HTML_INPUT_CHECKED 1
171: #define HTML_INPUT_DISABLED 2
172: #define HTML_INPUT_ERROR 3
173: #define HTML_INPUT_MAX 4
174: #define HTML_INPUT_MIN 5
175: #define HTML_INPUT_NAME 6
176: #define HTML_INPUT_SIZE 7
177: #define HTML_INPUT_SRC 8
178: #define HTML_INPUT_TYPE 9
179: #define HTML_INPUT_VALUE 10
180: #define HTML_INPUT_ATTRIBUTES 11
2.1 timbl 181:
182: #define HTML_L_ATTRIBUTES 4
183:
184: #define HTML_LI_ATTRIBUTES 4
185: #define HTML_LIST_ATTRIBUTES 4
186:
187: #define HTML_LINK_ATTRIBUTES 5
188:
189: #define HTML_ID_ATTRIBUTE 1
190:
191: #define HTML_NEXTID_ATTRIBUTES 1
192: #define HTML_NEXTID_N 0
193:
194: #define HTML_NOTE_ATTRIBUTES 4
195:
196: #define HTML_OPTION_ATTRIBUTES 3
197:
198: /* #define HTML_PRE_WIDTH 0
199: #define HTML_PRE_ATTRIBUTES 1
200: */
201: #define HTML_RENDER_ATTRIBUTES 2
202:
203: #define HTML_SELECT_ATTRIBUTES 4
204: #define HTML_TAB_ATTRIBUTES 2
205: #define HTML_TABLE_ATTRIBUTES 4
206: #define HTML_TD_ATTRIBUTES 4
207:
208: #define HTML_TEXTAREA_ATTRIBUTES 6
209:
210: #define HTML_TH_ATTRIBUTES 4
211:
212: #define HTML_UL_ATTRIBUTES 6
213:
214: extern CONST SGML_dtd HTMLP_dtd;
215:
216:
217: </PRE>
218: <H2>Start anchor element</H2>It is kinda convenient to have a
2.4 ! frystyk 219: particular routine for starting an
2.1 timbl 220: anchor element, as everything else
221: for HTML is simple anyway.
222: <H3>On entry</H3>targetstream poinst to a structured
223: stream object.<P>
224: name and href point to attribute
225: strings or are NULL if the attribute
226: is to be omitted.
227: <PRE>extern void HTStartAnchor PARAMS((
228: HTStructured * targetstream,
229: CONST char * name,
230: CONST char * href));
2.4 ! frystyk 231: </PRE>
2.1 timbl 232:
2.4 ! frystyk 233: <H2>Put image element</H2>
! 234: Hopefully as useful as HTStartAnchor.
! 235: <H3>On entry</H3>
! 236: targetstream point to a structured stream object.<P>
! 237: src, alt and align are omitted if they are set to NULL.
! 238: <PRE>
! 239: extern void HTMLPutImg PARAMS((HTStructured *obj,
! 240: CONST char *src,
! 241: CONST char *alt,
! 242: CONST char *align));
! 243: </PRE>
2.1 timbl 244:
245: <H2>Specify next ID to be used</H2>This is anoter convenience routine,
246: for specifying the next ID to be
247: used by an editor in the series z1.
248: z2,...
249: <PRE>extern void HTNextID PARAMS((HTStructured * targetStream, int n));
250:
251: #endif /* HTMLDTD_H */
252:
253: </PRE>End of module definition</BODY>
254: </HTML>
2.4 ! frystyk 255:
! 256:
! 257:
Webmaster