HTML Tidy
0.1
|
00001 #ifndef __PARSER_H__ 00002 #define __PARSER_H__ 00003 00004 /* parser.h -- HTML Parser 00005 00006 (c) 1998-2006 (W3C) MIT, ERCIM, Keio University 00007 See tidy.h for the copyright notice. 00008 00009 CVS Info : 00010 00011 $Author: arnaud02 $ 00012 $Date: 2007/02/04 23:08:28 $ 00013 $Revision: 1.13 $ 00014 00015 */ 00016 00017 #include "forward.h" 00018 00019 Bool TY_(CheckNodeIntegrity)(Node *node); 00020 00021 Bool TY_(TextNodeEndWithSpace)( Lexer *lexer, Node *node ); 00022 00023 /* 00024 used to determine how attributes 00025 without values should be printed 00026 this was introduced to deal with 00027 user defined tags e.g. Cold Fusion 00028 */ 00029 Bool TY_(IsNewNode)(Node *node); 00030 00031 void TY_(CoerceNode)(TidyDocImpl* doc, Node *node, TidyTagId tid, Bool obsolete, Bool expected); 00032 00033 /* extract a node and its children from a markup tree */ 00034 Node *TY_(RemoveNode)(Node *node); 00035 00036 /* remove node from markup tree and discard it */ 00037 Node *TY_(DiscardElement)( TidyDocImpl* doc, Node *element); 00038 00039 /* insert node into markup tree as the firt element 00040 of content of element */ 00041 void TY_(InsertNodeAtStart)(Node *element, Node *node); 00042 00043 /* insert node into markup tree as the last element 00044 of content of "element" */ 00045 void TY_(InsertNodeAtEnd)(Node *element, Node *node); 00046 00047 /* insert node into markup tree before element */ 00048 void TY_(InsertNodeBeforeElement)(Node *element, Node *node); 00049 00050 /* insert node into markup tree after element */ 00051 void TY_(InsertNodeAfterElement)(Node *element, Node *node); 00052 00053 Node *TY_(TrimEmptyElement)( TidyDocImpl* doc, Node *element ); 00054 Node* TY_(DropEmptyElements)(TidyDocImpl* doc, Node* node); 00055 00056 00057 /* assumes node is a text node */ 00058 Bool TY_(IsBlank)(Lexer *lexer, Node *node); 00059 00060 Bool TY_(IsJavaScript)(Node *node); 00061 00062 /* 00063 HTML is the top level element 00064 */ 00065 void TY_(ParseDocument)( TidyDocImpl* doc ); 00066 00067 00068 00069 /* 00070 XML documents 00071 */ 00072 Bool TY_(XMLPreserveWhiteSpace)( TidyDocImpl* doc, Node *element ); 00073 00074 void TY_(ParseXMLDocument)( TidyDocImpl* doc ); 00075 00076 #endif /* __PARSER_H__ */