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