Annotation of libwww/Library/src/HTML.html, revision 2.28
2.7 timbl 1: <HTML>
2: <HEAD>
2.26 frystyk 3: <TITLE>HTML to rich text Converter</TITLE>
2.27 frystyk 4: <!-- Changed by: Henrik Frystyk Nielsen, 27-Aug-1995 -->
2.7 timbl 5: </HEAD>
2.6 timbl 6: <BODY>
2.20 frystyk 7:
8: <H1>The HTML to styled text object converter</H1>
9:
10: <PRE>
11: /*
2.24 frystyk 12: ** (c) COPYRIGHT MIT 1995.
2.20 frystyk 13: ** Please first read the full copyright statement in the file COPYRIGH.
14: */
15: </PRE>
16:
17: This interprets the <A
2.28 ! frystyk 18: HREF="http://www.w3.org/pub/WWW/MarkUp/MarkUp.html">HTML</A>
2.20 frystyk 19: semantics and some HTMLPlus.<P>
20:
21: This module is implemented by <A HREF="HTML.c">HTML.c</A>, and it is
22: a part of the <A
2.28 ! frystyk 23: HREF="http://www.w3.org/pub/WWW/Library/">
2.25 frystyk 24: W3C Reference Library</A>.
2.20 frystyk 25:
26: <PRE>
27: #ifndef HTML_H
2.1 timbl 28: #define HTML_H
29:
2.13 luotonen 30: #include "HTFormat.h"
2.1 timbl 31: #include "HTAnchor.h"
2.8 timbl 32: #include "HTMLPDTD.h"
2.10 luotonen 33: </PRE>
2.1 timbl 34:
2.27 frystyk 35: <H2>Reopen an Existing HTML object</H2>
2.17 frystyk 36:
37: Reopening an existing HTML object allows it to be retained (for
38: example by the styled text object) after the structured stream has
39: been closed. To be actually deleted, the HTML object must be closed
40: once more times than it has been reopened.
41:
42: <PRE>
43: extern void HTML_reopen PARAMS((HTStructured * me));
2.10 luotonen 44: </PRE>
2.17 frystyk 45:
2.10 luotonen 46: <H2>Converters</H2>
2.8 timbl 47:
2.17 frystyk 48: These are the converters implemented in this module:
2.8 timbl 49:
2.17 frystyk 50: <PRE>
2.22 frystyk 51: #ifndef pyramid
2.27 frystyk 52: extern HTConverter HTMLToPlain, HTMLToC, HTMLPresent;
2.17 frystyk 53: #endif
2.8 timbl 54: </PRE>
2.17 frystyk 55:
2.27 frystyk 56: <H2>Selecting internal character set representations</H2>
57:
58: <PRE>
59: typedef enum _HTMLCharacterSet {
2.1 timbl 60: HTML_ISO_LATIN1,
61: HTML_NEXT_CHARS,
62: HTML_PC_CP950
63: } HTMLCharacterSet;
64:
65: extern void HTMLUseCharacterSet PARAMS((HTMLCharacterSet i));
2.6 timbl 66:
2.16 timbl 67: </PRE>
2.22 frystyk 68:
69: <H2>White Space Treatment</H2>
70:
71: There is a small number of different ways of treating white space in
72: SGML, in mapping from a text object to HTML. These have to be
73: programmed it seems.
74:
75: <PRE>
2.16 timbl 76: /*
77: In text object \n\n \n tab \n\n\t
78: -------------- ------------- ----- ----- -------
79: in Address,
80: Blockquote,
2.22 frystyk 81: Normal, <P> <BR> - NORMAL
82: H1-6: close+open <BR> - HEADING
83: Glossary <DT> <DT> <DD> <P> GLOSSARY
2.16 timbl 84: List,
2.22 frystyk 85: Menu <LI> <LI> - <P> LIST
86: Dir <LI> <LI> <LI> DIR
2.16 timbl 87: Pre etc \n\n \n \t PRE
2.7 timbl 88:
2.16 timbl 89: */
90:
91: typedef enum _white_space_treatment {
92: WS_NORMAL,
93: WS_HEADING,
94: WS_GLOSSARY,
95: WS_LIST,
96: WS_DIR,
97: WS_PRE
98: } white_space_treatment;
99:
100: </pre>
2.22 frystyk 101:
2.16 timbl 102: <h2>Nesting State</h2>
103: These elements form tree with an item for each nesting state: that
104: is, each unique combination of nested elements which has a
105: specific style.
106: <pre>
107: typedef struct _HTNesting {
108: void * style; /* HTStyle *: Platform dependent */
109: white_space_treatment wst;
110: struct _HTNesting * parent;
111: int element_number;
112: int item_number; /* only for ordered lists */
113: int list_level; /* how deep nested */
114: HTList * children;
115: BOOL paragraph_break;
116: int magic;
117: BOOL object_gens_HTML; /* we don't generate HTML */
118: } HTNesting;
119:
120:
121: </pre>
122: <H2>Nesting functions</H2>
123: These functions were new with HTML2.c. They allow the tree
124: of SGML nesting states to be manipulated, and SGML regenerated from the
125: style sequence.
126: <PRE>
127:
128: extern void HTRegenInit NOPARAMS;
129:
130: extern void HTRegenCharacter PARAMS((
131: char c,
132: HTNesting * nesting,
133: HTStructured * target));
134:
135: extern void HTNestingChange PARAMS((
136: HTStructured* s,
137: HTNesting* old,
2.18 frystyk 138: HTNesting * newnest,
2.16 timbl 139: HTChildAnchor * info,
140: CONST char * aName));
141:
142: extern HTNesting * HTMLCommonality PARAMS((
143: HTNesting * s1,
144: HTNesting * s2));
145:
146: extern HTNesting * HTNestElement PARAMS((HTNesting * p, int ele));
147: extern /* HTStyle * */ void * HTStyleForNesting PARAMS((HTNesting * n));
148:
149: extern HTNesting* HTMLAncestor PARAMS((HTNesting * old, int depth));
2.18 frystyk 150:
151: extern HTNesting* CopyBranch PARAMS((HTNesting * old, HTNesting * newnest,
152: int depth));
153:
2.16 timbl 154: extern HTNesting * HTInsertLevel PARAMS((HTNesting * old,
155: int element_number,
156: int level));
157: extern HTNesting * HTDeleteLevel PARAMS((HTNesting * old,
158: int level));
159: extern int HTMLElementNumber PARAMS((HTNesting * s));
160: extern int HTMLLevel PARAMS(( HTNesting * s));
161: extern HTNesting* HTMLAncestor PARAMS((HTNesting * old, int depth));
162:
163: #endif /* end HTML_H */
164:
165: </PRE>
166:
167: end</BODY>
2.7 timbl 168: </HTML>
Webmaster