Annotation of libwww/Library/src/HTML.html, revision 2.30
2.7 timbl 1: <HTML>
2: <HEAD>
2.26 frystyk 3: <TITLE>HTML to rich text Converter</TITLE>
2.30 ! frystyk 4: <!-- Changed by: Henrik Frystyk Nielsen, 19-Nov-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>
2.30 ! frystyk 43: extern void HTML_reopen (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.27 frystyk 51: extern HTConverter HTMLToPlain, HTMLToC, HTMLPresent;
2.8 timbl 52: </PRE>
2.17 frystyk 53:
2.27 frystyk 54: <H2>Selecting internal character set representations</H2>
55:
56: <PRE>
57: typedef enum _HTMLCharacterSet {
2.1 timbl 58: HTML_ISO_LATIN1,
59: HTML_NEXT_CHARS,
60: HTML_PC_CP950
61: } HTMLCharacterSet;
62:
2.30 ! frystyk 63: extern void HTMLUseCharacterSet (HTMLCharacterSet i);
2.6 timbl 64:
2.16 timbl 65: </PRE>
2.22 frystyk 66:
67: <H2>White Space Treatment</H2>
68:
69: There is a small number of different ways of treating white space in
70: SGML, in mapping from a text object to HTML. These have to be
71: programmed it seems.
72:
73: <PRE>
2.16 timbl 74: /*
75: In text object \n\n \n tab \n\n\t
76: -------------- ------------- ----- ----- -------
77: in Address,
78: Blockquote,
2.22 frystyk 79: Normal, <P> <BR> - NORMAL
80: H1-6: close+open <BR> - HEADING
81: Glossary <DT> <DT> <DD> <P> GLOSSARY
2.16 timbl 82: List,
2.22 frystyk 83: Menu <LI> <LI> - <P> LIST
84: Dir <LI> <LI> <LI> DIR
2.16 timbl 85: Pre etc \n\n \n \t PRE
2.7 timbl 86:
2.16 timbl 87: */
88:
89: typedef enum _white_space_treatment {
90: WS_NORMAL,
91: WS_HEADING,
92: WS_GLOSSARY,
93: WS_LIST,
94: WS_DIR,
95: WS_PRE
96: } white_space_treatment;
97:
98: </pre>
2.22 frystyk 99:
2.16 timbl 100: <h2>Nesting State</h2>
101: These elements form tree with an item for each nesting state: that
102: is, each unique combination of nested elements which has a
103: specific style.
104: <pre>
105: typedef struct _HTNesting {
106: void * style; /* HTStyle *: Platform dependent */
107: white_space_treatment wst;
108: struct _HTNesting * parent;
109: int element_number;
110: int item_number; /* only for ordered lists */
111: int list_level; /* how deep nested */
112: HTList * children;
113: BOOL paragraph_break;
114: int magic;
115: BOOL object_gens_HTML; /* we don't generate HTML */
116: } HTNesting;
117:
118:
119: </pre>
120: <H2>Nesting functions</H2>
121: These functions were new with HTML2.c. They allow the tree
122: of SGML nesting states to be manipulated, and SGML regenerated from the
123: style sequence.
124: <PRE>
125:
2.30 ! frystyk 126: extern void HTRegenInit (void);
2.16 timbl 127:
2.30 ! frystyk 128: extern void HTRegenCharacter (
2.16 timbl 129: char c,
130: HTNesting * nesting,
2.30 ! frystyk 131: HTStructured * target);
2.16 timbl 132:
2.30 ! frystyk 133: extern void HTNestingChange (
2.16 timbl 134: HTStructured* s,
135: HTNesting* old,
2.18 frystyk 136: HTNesting * newnest,
2.16 timbl 137: HTChildAnchor * info,
2.30 ! frystyk 138: CONST char * aName);
2.16 timbl 139:
2.30 ! frystyk 140: extern HTNesting * HTMLCommonality (
2.16 timbl 141: HTNesting * s1,
2.30 ! frystyk 142: HTNesting * s2);
2.16 timbl 143:
2.30 ! frystyk 144: extern HTNesting * HTNestElement (HTNesting * p, int ele);
! 145: extern /* HTStyle * */ void * HTStyleForNesting (HTNesting * n);
2.16 timbl 146:
2.30 ! frystyk 147: extern HTNesting* HTMLAncestor (HTNesting * old, int depth);
2.18 frystyk 148:
2.30 ! frystyk 149: extern HTNesting* CopyBranch (HTNesting * old, HTNesting * newnest,
! 150: int depth);
2.18 frystyk 151:
2.30 ! frystyk 152: extern HTNesting * HTInsertLevel (HTNesting * old,
2.16 timbl 153: int element_number,
2.30 ! frystyk 154: int level);
! 155: extern HTNesting * HTDeleteLevel (HTNesting * old,
! 156: int level);
! 157: extern int HTMLElementNumber (HTNesting * s);
! 158: extern int HTMLLevel ( HTNesting * s);
! 159: extern HTNesting* HTMLAncestor (HTNesting * old, int depth);
2.16 timbl 160:
161: #endif /* end HTML_H */
162:
163: </PRE>
164:
165: end</BODY>
2.7 timbl 166: </HTML>
Webmaster