HTML Tidy
0.1
|
00001 #ifndef __CLEAN_H__ 00002 #define __CLEAN_H__ 00003 00004 /* clean.h -- clean up misuse of presentation markup 00005 00006 (c) 1998-2006 (W3C) MIT, ERCIM, Keio University 00007 See tidy.h for the copyright notice. 00008 00009 CVS Info: 00010 $Author: arnaud02 $ 00011 $Date: 2006/09/12 15:14:44 $ 00012 $Revision: 1.14 $ 00013 00014 */ 00015 00016 void TY_(FixNodeLinks)(Node *node); 00017 00018 void TY_(FreeStyles)( TidyDocImpl* doc ); 00019 00020 /* Add class="foo" to node 00021 */ 00022 void TY_(AddStyleAsClass)( TidyDocImpl* doc, Node *node, ctmbstr stylevalue ); 00023 void TY_(AddStyleProperty)(TidyDocImpl* doc, Node *node, ctmbstr property ); 00024 00025 void TY_(CleanDocument)( TidyDocImpl* doc ); 00026 00027 /* simplifies <b><b> ... </b> ...</b> etc. */ 00028 void TY_(NestedEmphasis)( TidyDocImpl* doc, Node* node ); 00029 00030 /* replace i by em and b by strong */ 00031 void TY_(EmFromI)( TidyDocImpl* doc, Node* node ); 00032 00033 /* 00034 Some people use dir or ul without an li 00035 to indent the content. The pattern to 00036 look for is a list with a single implicit 00037 li. This is recursively replaced by an 00038 implicit blockquote. 00039 */ 00040 void TY_(List2BQ)( TidyDocImpl* doc, Node* node ); 00041 00042 /* 00043 Replace implicit blockquote by div with an indent 00044 taking care to reduce nested blockquotes to a single 00045 div with the indent set to match the nesting depth 00046 */ 00047 void TY_(BQ2Div)( TidyDocImpl* doc, Node* node ); 00048 00049 00050 void TY_(DropSections)( TidyDocImpl* doc, Node* node ); 00051 00052 00053 /* 00054 This is a major clean up to strip out all the extra stuff you get 00055 when you save as web page from Word 2000. It doesn't yet know what 00056 to do with VML tags, but these will appear as errors unless you 00057 declare them as new tags, such as o:p which needs to be declared 00058 as inline. 00059 */ 00060 void TY_(CleanWord2000)( TidyDocImpl* doc, Node *node); 00061 00062 Bool TY_(IsWord2000)( TidyDocImpl* doc ); 00063 00064 /* where appropriate move object elements from head to body */ 00065 void TY_(BumpObject)( TidyDocImpl* doc, Node *html ); 00066 00067 /* This is disabled due to http://tidy.sf.net/bug/681116 */ 00068 #if 0 00069 void TY_(FixBrakes)( TidyDocImpl* pDoc, Node *pParent ); 00070 #endif 00071 00072 void TY_(VerifyHTTPEquiv)( TidyDocImpl* pDoc, Node *pParent ); 00073 00074 void TY_(DropComments)(TidyDocImpl* doc, Node* node); 00075 void TY_(DropFontElements)(TidyDocImpl* doc, Node* node, Node **pnode); 00076 void TY_(WbrToSpace)(TidyDocImpl* doc, Node* node); 00077 void TY_(DowngradeTypography)(TidyDocImpl* doc, Node* node); 00078 void TY_(ReplacePreformattedSpaces)(TidyDocImpl* doc, Node* node); 00079 void TY_(NormalizeSpaces)(Lexer *lexer, Node *node); 00080 void TY_(ConvertCDATANodes)(TidyDocImpl* doc, Node* node); 00081 00082 void TY_(FixAnchors)(TidyDocImpl* doc, Node *node, Bool wantName, Bool wantId); 00083 void TY_(FixXhtmlNamespace)(TidyDocImpl* doc, Bool wantXmlns); 00084 void TY_(FixLanguageInformation)(TidyDocImpl* doc, Node* node, Bool wantXmlLang, Bool wantLang); 00085 00086 00087 #endif /* __CLEAN_H__ */