1#ifndef __PARSER_H__
2#define __PARSER_H__
3
4/* parser.h -- HTML Parser
5
6  (c) 1998-2006 (W3C) MIT, ERCIM, Keio University
7  See tidy.h for the copyright notice.
8
9  CVS Info :
10
11    $Author: iccir $
12    $Date: 2007/01/30 23:46:52 $
13    $Revision: 1.3 $
14
15*/
16
17#include "forward.h"
18
19Bool TY_(CheckNodeIntegrity)(Node *node);
20
21/*
22 used to determine how attributes
23 without values should be printed
24 this was introduced to deal with
25 user defined tags e.g. Cold Fusion
26*/
27Bool TY_(IsNewNode)(Node *node);
28
29void TY_(CoerceNode)(TidyDocImpl* doc, Node *node, TidyTagId tid, Bool obsolete, Bool expected);
30
31/* extract a node and its children from a markup tree */
32Node *TY_(RemoveNode)(Node *node);
33
34/* remove node from markup tree and discard it */
35Node *TY_(DiscardElement)( TidyDocImpl* doc, Node *element);
36
37/* insert node into markup tree as the firt element
38 of content of element */
39void TY_(InsertNodeAtStart)(Node *element, Node *node);
40
41/* insert node into markup tree as the last element
42 of content of "element" */
43void TY_(InsertNodeAtEnd)(Node *element, Node *node);
44
45/* insert node into markup tree before element */
46void TY_(InsertNodeBeforeElement)(Node *element, Node *node);
47
48/* insert node into markup tree after element */
49void TY_(InsertNodeAfterElement)(Node *element, Node *node);
50
51Node *TY_(TrimEmptyElement)( TidyDocImpl* doc, Node *element );
52Node* TY_(DropEmptyElements)(TidyDocImpl* doc, Node* node);
53
54
55/* assumes node is a text node */
56Bool TY_(IsBlank)(Lexer *lexer, Node *node);
57
58Bool TY_(IsJavaScript)(Node *node);
59
60/*
61  HTML is the top level element
62*/
63void TY_(ParseDocument)( TidyDocImpl* doc );
64
65
66
67/*
68  XML documents
69*/
70Bool TY_(XMLPreserveWhiteSpace)( TidyDocImpl* doc, Node *element );
71
72void TY_(ParseXMLDocument)( TidyDocImpl* doc );
73
74#endif /* __PARSER_H__ */
75