Annotation of libwww/Library/src/HTMLDTD.html, revision 2.15
2.9 timbl 1: <HTML>
2: <HEAD>
2.6 timbl 3: <TITLE>The HTML DTD -- software interface in libwww</TITLE>
2.9 timbl 4: </HEAD>
2.2 timbl 5: <BODY>
2.15 ! frystyk 6:
! 7: <H1>HTML 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 itself.
! 18: The C modular structure doesn't work very well here, as the dtd is
! 19: partly in the .h and partly in the .c which are not very independent.
! 20: Tant pis. <P>
! 21:
! 22: This module a part of the <A
! 23: HREF="http://info.cern.ch/hypertext/WWW/Library/User/Guide/Guide.html">
! 24: Library of Common Code</A>.
! 25:
! 26: <PRE>
! 27: #ifndef HTMLDTD_H
2.1 timbl 28: #define HTMLDTD_H
29:
2.2 timbl 30: #include "HTUtils.h"
2.13 timbl 31: #include <A
32: NAME="z3" HREF="SGML.html">"SGML.h"</A>
2.1 timbl 33:
2.6 timbl 34: </PRE>
35: <H2>Element Numbers</H2>
36: <PRE>
37: </PRE>Must Match all tables by element!
2.9 timbl 38: These include tables in <A
39: NAME="z1" HREF="HTMLDTD.c">HTMLDTD.c</A>
2.7 timbl 40: and code in <A
2.9 timbl 41: NAME="z0" HREF="HTML.c">HTML.c</A> .
2.6 timbl 42: <PRE>typedef enum _HTMLElement {
2.7 timbl 43: HTML_A, HTML_ADDRESS,
2.8 timbl 44: HTML_B, HTML_BLOCKQUOTE, HTML_BODY,
2.11 timbl 45: HTML_BR,
2.7 timbl 46: HTML_CITE, HTML_CODE, HTML_COMMENT,
47: HTML_DD, HTML_DFN, HTML_DIR,
48: HTML_DL, HTML_DLC, HTML_DT,
49: HTML_EM,
2.8 timbl 50: HTML_HEAD,
2.1 timbl 51: HTML_H1, HTML_H2, HTML_H3,
52: HTML_H4, HTML_H5, HTML_H6, HTML_H7,
2.11 timbl 53: HTML_HR,
2.8 timbl 54: HTML_HTML,
2.7 timbl 55: HTML_I, HTML_IMG, HTML_ISINDEX,
56: HTML_KBD,
57: HTML_LI, HTML_LINK, HTML_LISTING,
2.10 timbl 58: HTML_MENU, HTML_NEXTID,
2.1 timbl 59: HTML_OL, HTML_P, HTML_PLAINTEXT, HTML_PRE,
2.7 timbl 60: HTML_SAMP, HTML_STRONG,
61: HTML_TITLE, HTML_TT,
62: HTML_U, HTML_UL,
63: HTML_VAR, HTML_XMP } HTMLElement;
2.1 timbl 64:
2.12 duns 65: #define HTML_ELEMENTS 47
2.1 timbl 66:
2.6 timbl 67: </PRE>
68: <H2>Attribute numbers</H2>
69: <PRE>
70: </PRE>Identifier is HTML_<element>_<attribute>.
2.11 timbl 71: These must match the tables in <A
72: NAME="z2" HREF="HTMLDTD.c">HTMLDTD.c</A>
73: !
2.6 timbl 74: <PRE>#define HTML_A_HREF 0
2.1 timbl 75: #define HTML_A_NAME 1
2.9 timbl 76: #define HTML_A_REL 2
77: #define HTML_A_REV 3
78: #define HTML_A_TITLE 4
79: #define HTML_A_TYPE 5
80: #define HTML_A_URN 6
81: #define HTML_A_ATTRIBUTES 7
2.1 timbl 82:
83: #define DL_COMPACT 0
2.6 timbl 84:
2.11 timbl 85: #define HTML_IMG_ALIGN 0
2.1 timbl 86:
2.11 timbl 87: #define HTML_IMG_ALT 1
88: #define HTML_IMG_ISMAP 2 /* Obsolete but supported */
89: #define HTML_IMG_SRC 3
90: #define HTML_IMG_ATTRIBUTES 4
2.1 timbl 91:
2.11 timbl 92: #define HTML_NEXTID_ATTRIBUTES 1
93: #define HTML_NEXTID_N 0
94:
95: #define HTML_PRE_WIDTH 0
96: #define HTML_PRE_ATTRIBUTES 1
97:
2.1 timbl 98: extern CONST SGML_dtd HTML_dtd;
99:
2.2 timbl 100:
101: </PRE>
102: <H2>Start anchor element</H2>It is kinda convenient to have a
103: particulr routine for starting an
104: anchor element, as everything else
105: for HTML is simple anyway.
106: <H3>On entry</H3>targetstream poinst to a structured
107: stream object.<P>
108: name and href point to attribute
109: strings or are NULL if the attribute
110: is to be omitted.
111: <PRE>extern void HTStartAnchor PARAMS((
112: HTStructured * targetstream,
113: CONST char * name,
114: CONST char * href));
115:
116:
2.1 timbl 117: #endif /* HTMLDTD_H */
2.11 timbl 118:
119:
120: </PRE>
121: <H2>Specify next ID to be used</H2>This is anoter convenience routine,
122: for specifying the next ID to be
123: used by an editor in the series z1.
124: z2,...
125: <PRE>extern void HTNextID PARAMS((HTStructured * targetStream, int n));
2.2 timbl 126:
2.10 timbl 127: </PRE>End of module definition</BODY>
2.9 timbl 128: </HTML>
Webmaster