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