--- libwww/Library/src/HTML.html 1998/05/14 02:10:42 2.35 +++ libwww/Library/src/HTML.html 1999/01/06 15:38:47 2.36 @@ -1,58 +1,61 @@ -W3C Sample Code Library libwww HTML TO RICH TEXT CONVERTER - + W3C Sample Code Library libwww HTML Parser With Text Object Converter - -

The HTML to styled text object converter

- +

+ Simple HTML Parser With Text Object Converter +

 /*
 **	(c) COPYRIGHT MIT 1995.
 **	Please first read the full copyright statement in the file COPYRIGH.
 */
 
- -This interprets the HTML -semantics and some HTMLPlus.

- -This module is implemented by HTML.c, and it is -a part of the -W3C Sample Code Library. - +

+This interprets the HTML +semantics passed to it by the SGML parser. It then +creates a HText object which the application can +use to render an HTML object as text comes in over the wire. The +stylesheet manager can be used to ensure that +the rendering is done according to whatever style information is present. +

+This module is implemented by HTML.c, and it is a part +of the W3C Sample Code Library.

 #ifndef HTML_H
 #define HTML_H
 
 #include "HTFormat.h"
-#include "HTAnchor.h"
 #include "HTMLPDTD.h"
 
- -

Reopen an Existing HTML object

- -Reopening an existing HTML object allows it to be retained (for -example by the styled text object) after the structured stream has -been closed. To be actually deleted, the HTML object must be closed -once more times than it has been reopened. - -
-extern void HTML_reopen (HTStructured * me);
-
- -

Converters

- -These are the converters implemented in this module: - -
-extern HTConverter HTMLToPlain, HTMLToC, HTMLPresent;
-
- -

Selecting internal character set representations

- +

+ Converters +

+

+These are the converters implemented in this module. The first converts from +HTML to presentation or plain text. +

+extern HTConverter HTMLToPlain;
+
+

+The next converts from HTML to a simple C like representation. It puts everything +not in PRE within C style comments. This is the way that the line mode browser +is used to convert the libwww HTML files to C style .h files +

+extern HTConverter HTMLToC;
+
+

+This one converts the HTML stream to a rendered object using the +HText interface. +

+extern HTConverter HTMLPresent;
+
+

+ Selecting Internal Character Set Representation +

+

+Only ISO_LATIN1 is currently supported.

 typedef enum _HTMLCharacterSet {
 	HTML_ISO_LATIN1,
@@ -60,111 +63,14 @@ typedef enum _HTMLCharacterSet {
 	HTML_PC_CP950
 } HTMLCharacterSet;
 
-extern void HTMLUseCharacterSet (HTMLCharacterSet i);
-
+extern BOOL HTMLUseCharacterSet (HTMLCharacterSet charset);
 
- -

White Space Treatment

- -There is a small number of different ways of treating white space in -SGML, in mapping from a text object to HTML. These have to be -programmed it seems. -
-/*
-In text object	\n\n		\n	tab	\n\n\t
---------------	-------------	-----	-----	-------
-in Address,
-Blockquote,
-Normal,		<P>		<BR>	-		NORMAL
-H1-6:		close+open	<BR>	-		HEADING
-Glossary	<DT>		<DT>	<DD>	<P>	GLOSSARY
-List,				
-Menu		<LI>		<LI>	-	<P>	LIST
-Dir		<LI>		<LI>	<LI>		DIR
-Pre etc		\n\n		\n	\t		PRE
-
-*/
-
-typedef enum _white_space_treatment {
-	WS_NORMAL,
-	WS_HEADING,
-	WS_GLOSSARY,
-	WS_LIST,
-	WS_DIR,
-	WS_PRE
-} white_space_treatment;
-
-
- -

Nesting State

-These elements form tree with an item for each nesting state: that -is, each unique combination of nested elements which has a -specific style. -
-typedef struct _HTNesting {
-    void *			style;  /* HTStyle *: Platform dependent */
-    white_space_treatment	wst;
-    struct _HTNesting *		parent;
-    int				element_number;
-    int				item_number;	/* only for ordered lists */
-    int				list_level;	/* how deep nested */
-    HTList *			children;
-    BOOL			paragraph_break;
-    int				magic;
-    BOOL			object_gens_HTML; /* we don't generate HTML */
-} HTNesting;
-
-
-
-

Nesting functions

-These functions were new with HTML2.c. They allow the tree -of SGML nesting states to be manipulated, and SGML regenerated from the -style sequence. -
-
-extern void HTRegenInit (void);
-
-extern void HTRegenCharacter (
-	char			c,
-	HTNesting *		nesting,
-	HTStructured *		target);
-
-extern	void HTNestingChange (
-	HTStructured* 	s, 
-	HTNesting*		old, 
-	HTNesting *		newnest,
-	HTChildAnchor *		info,
-	const char *		aName);
-
-extern HTNesting * HTMLCommonality (
-	HTNesting * 	s1,
-	HTNesting *	s2);
-
-extern HTNesting * HTNestElement (HTNesting * p, int ele);
-extern /* HTStyle * */ void * HTStyleForNesting (HTNesting * n);
-
-extern HTNesting* HTMLAncestor (HTNesting * old, int depth);
-
-extern HTNesting* CopyBranch (HTNesting * old, HTNesting * newnest,
-				     int depth);
-
-extern HTNesting * HTInsertLevel (HTNesting * old,
-		int	element_number,
-		int	level);
-extern HTNesting * HTDeleteLevel (HTNesting * old,
-		int	level);
-extern int HTMLElementNumber (HTNesting * s);
-extern int HTMLLevel ( HTNesting * s);
-extern HTNesting* HTMLAncestor (HTNesting * old, int depth);
-
 #endif		/* end HTML_H */
-
 
- -
+

+


-@(#) $Id: HTML.html,v 2.35 1998/05/14 02:10:42 frystyk Exp $ + @(#) $Id: HTML.html,v 2.36 1999/01/06 15:38:47 frystyk Exp $
- - +