Annotation of libwww/Library/src/HTML.html, revision 2.15
2.7 timbl 1: <HTML>
2: <HEAD>
3: <TITLE>HTML to rich text converter for libwww</TITLE>
2.12 timbl 4: <NEXTID N="z5">
2.7 timbl 5: </HEAD>
2.6 timbl 6: <BODY>
2.8 timbl 7: <H1>The HTML to styled text object converter</H1>This interprets the <A
8: NAME="z0" HREF="../../MarkUp/MarkUp.html">HTML</A> semantics
9: and some HTMLPlus.<P>
10: Part of <A
11: NAME="z2" HREF="Overview.html">libwww</A> . Implemented by <A
12: NAME="z3" HREF="HTML.c">HTML.c</A>
2.6 timbl 13: <PRE>#ifndef HTML_H
2.1 timbl 14: #define HTML_H
15:
16: #include "HTUtils.h"
2.13 luotonen 17: #include "HTFormat.h"
2.1 timbl 18: #include "HTAnchor.h"
2.8 timbl 19: #include "HTMLPDTD.h"
2.1 timbl 20:
2.8 timbl 21: #define DTD HTMLP_dtd
22:
2.6 timbl 23: #ifdef SHORT_NAMES
24: #define HTMLPresentation HTMLPren
25: #define HTMLPresent HTMLPres
26: #endif
2.1 timbl 27:
28: extern CONST HTStructuredClass HTMLPresentation;
29:
2.6 timbl 30: </PRE>
2.9 timbl 31: <H2>HTML_new: A structured stream to
2.12 timbl 32: parse HTML</H2>When this routine is called, the
33: request structure may contain a <A
34: NAME="z4" HREF="HTAccess.html#z6">childAnchor</A>
35: value. I that case it is the responsability
36: of this module to select the anchor.<P>
37:
2.9 timbl 38: <PRE>extern HTStructured* HTML_new PARAMS((HTRequest * request,
2.8 timbl 39: void * param,
40: HTFormat input_format,
41: HTFormat output_format,
42: HTStream * output_stream));
43:
2.10 luotonen 44: </PRE>
45: <H3>Reopen</H3>Reopening an existing HTML object
46: allows it to be retained (for example
47: by the styled text object) after
48: the structured stream has been closed.
2.11 timbl 49: To be actually deleted, the HTML
2.10 luotonen 50: object must be closed once more
51: times than it has been reopened.
2.11 timbl 52: <PRE>extern void HTML_reopen PARAMS((HTStructured * me));
2.1 timbl 53:
2.10 luotonen 54: </PRE>
55: <H2>Converters</H2>
2.15 ! frystyk 56: <PRE>extern HTConverter HTMLToPlain, HTMLToC, HTMLPresent, HTMLToTeX;
2.8 timbl 57:
58:
59: </PRE>
60: <H2>Selecting internal character set
61: representations</H2>
62: <PRE>typedef enum _HTMLCharacterSet {
2.1 timbl 63: HTML_ISO_LATIN1,
64: HTML_NEXT_CHARS,
65: HTML_PC_CP950
66: } HTMLCharacterSet;
67:
68: extern void HTMLUseCharacterSet PARAMS((HTMLCharacterSet i));
69:
2.6 timbl 70: </PRE>
71: <H2>Record error message as a hypertext
72: object</H2>The error message should be marked
73: as an error so that it can be reloaded
74: later. This implementation just throws
75: up an error message and leaves the
76: document unloaded.
2.10 luotonen 77: <H3>On entry,</H3>
78: <DL>
79: <DT>sink
2.11 timbl 80: <DD> is a stream to the output device
2.10 luotonen 81: if any
82: <DT>number
2.11 timbl 83: <DD> is the HTTP error number
2.10 luotonen 84: <DT>message
2.11 timbl 85: <DD> is the human readable message.
2.10 luotonen 86: </DL>
87:
88: <H3>On exit,</H3>a return code like HT_LOADED if object
89: exists else < 0
90: <PRE>PUBLIC int HTLoadError PARAMS((
2.14 luotonen 91: HTRequest * req,
2.1 timbl 92: int number,
93: CONST char * message));
94:
95: #endif
2.6 timbl 96:
2.7 timbl 97:
2.11 timbl 98: </PRE>end</BODY>
2.7 timbl 99: </HTML>
Webmaster