tidy.h

Go to the documentation of this file.
00001 #ifndef __TIDY_H__
00002 #define __TIDY_H__
00003 
00004 /** @file tidy.h - Defines HTML Tidy API implemented by tidy library.
00005 
00006   Public interface is const-correct and doesn't explicitly depend
00007   on any globals.  Thus, thread-safety may be introduced w/out
00008   changing the interface.
00009 
00010   Looking ahead to a C++ wrapper, C functions always pass 
00011   this-equivalent as 1st arg.
00012 
00013 
00014   Copyright (c) 1998-2005 World Wide Web Consortium
00015   (Massachusetts Institute of Technology, European Research 
00016   Consortium for Informatics and Mathematics, Keio University).
00017   All Rights Reserved.
00018 
00019   CVS Info :
00020 
00021     $Author: arnaud02 $ 
00022     $Date: 2005/04/08 09:11:12 $ 
00023     $Revision: 1.13 $ 
00024 
00025   Contributing Author(s):
00026 
00027      Dave Raggett <dsr@w3.org>
00028 
00029   The contributing author(s) would like to thank all those who
00030   helped with testing, bug fixes and suggestions for improvements. 
00031   This wouldn't have been possible without your help.
00032 
00033   COPYRIGHT NOTICE:
00034  
00035   This software and documentation is provided "as is," and
00036   the copyright holders and contributing author(s) make no
00037   representations or warranties, express or implied, including
00038   but not limited to, warranties of merchantability or fitness
00039   for any particular purpose or that the use of the software or
00040   documentation will not infringe any third party patents,
00041   copyrights, trademarks or other rights. 
00042 
00043   The copyright holders and contributing author(s) will not be held
00044   liable for any direct, indirect, special or consequential damages
00045   arising out of any use of the software or documentation, even if
00046   advised of the possibility of such damage.
00047 
00048   Permission is hereby granted to use, copy, modify, and distribute
00049   this source code, or portions hereof, documentation and executables,
00050   for any purpose, without fee, subject to the following restrictions:
00051 
00052   1. The origin of this source code must not be misrepresented.
00053   2. Altered versions must be plainly marked as such and must
00054      not be misrepresented as being the original source.
00055   3. This Copyright notice may not be removed or altered from any
00056      source or altered source distribution.
00057  
00058   The copyright holders and contributing author(s) specifically
00059   permit, without fee, and encourage the use of this source code
00060   as a component for supporting the Hypertext Markup Language in
00061   commercial products. If you use this source code in a product,
00062   acknowledgment is not required but would be appreciated.
00063 
00064 
00065   Created 2001-05-20 by Charles Reitzel
00066   Updated 2002-07-01 by Charles Reitzel - 1st Implementation
00067 
00068 */
00069 
00070 #include "platform.h"
00071 #include "tidyenum.h"
00072 
00073 #ifdef __cplusplus
00074 extern "C" {
00075 #endif
00076 
00077 /** @defgroup Opaque Opaque Types
00078 **
00079 ** Cast to implementation types within lib.
00080 ** Reduces inter-dependencies/conflicts w/ application code.
00081 ** @{
00082 */
00083 
00084 /** @struct TidyDoc
00085 **  Opaque document datatype
00086 */
00087 opaque_type( TidyDoc );
00088 
00089 /** @struct TidyOption
00090 **  Opaque option datatype
00091 */
00092 opaque_type( TidyOption );
00093 
00094 /** @struct TidyNode
00095 **  Opaque node datatype
00096 */
00097 opaque_type( TidyNode );
00098 
00099 /** @struct TidyAttr
00100 **  Opaque attribute datatype
00101 */
00102 opaque_type( TidyAttr );
00103 
00104 /** @} */
00105 
00106 TIDY_STRUCT struct _TidyBuffer;
00107 typedef struct _TidyBuffer TidyBuffer;
00108 
00109 
00110 /** @defgroup Basic Basic Operations
00111 **
00112 ** Tidy public interface
00113 **
00114 ** Several functions return an integer document status:
00115 **
00116 ** <pre>
00117 ** 0    -> SUCCESS
00118 ** >0   -> 1 == TIDY WARNING, 2 == TIDY ERROR
00119 ** <0   -> SEVERE ERROR
00120 ** </pre>
00121 ** 
00122 The following is a short example program.
00123 
00124 <pre>
00125 #include &lt;tidy.h&gt;
00126 #include &lt;buffio.h&gt;
00127 #include &lt;stdio.h&gt;
00128 #include &lt;errno.h&gt;
00129 
00130 
00131 int main(int argc, char **argv )
00132 {
00133   const char* input = "&lt;title&gt;Foo&lt;/title&gt;&lt;p&gt;Foo!";
00134   TidyBuffer output = {0};
00135   TidyBuffer errbuf = {0};
00136   int rc = -1;
00137   Bool ok;
00138 
00139   TidyDoc tdoc = tidyCreate();                     // Initialize "document"
00140   printf( "Tidying:\t\%s\\n", input );
00141 
00142   ok = tidyOptSetBool( tdoc, TidyXhtmlOut, yes );  // Convert to XHTML
00143   if ( ok )
00144     rc = tidySetErrorBuffer( tdoc, &amp;errbuf );      // Capture diagnostics
00145   if ( rc &gt;= 0 )
00146     rc = tidyParseString( tdoc, input );           // Parse the input
00147   if ( rc &gt;= 0 )
00148     rc = tidyCleanAndRepair( tdoc );               // Tidy it up!
00149   if ( rc &gt;= 0 )
00150     rc = tidyRunDiagnostics( tdoc );               // Kvetch
00151   if ( rc &gt; 1 )                                    // If error, force output.
00152     rc = ( tidyOptSetBool(tdoc, TidyForceOutput, yes) ? rc : -1 );
00153   if ( rc &gt;= 0 )
00154     rc = tidySaveBuffer( tdoc, &amp;output );          // Pretty Print
00155 
00156   if ( rc &gt;= 0 )
00157   {
00158     if ( rc &gt; 0 )
00159       printf( "\\nDiagnostics:\\n\\n\%s", errbuf.bp );
00160     printf( "\\nAnd here is the result:\\n\\n\%s", output.bp );
00161   }
00162   else
00163     printf( "A severe error (\%d) occurred.\\n", rc );
00164 
00165   tidyBufFree( &amp;output );
00166   tidyBufFree( &amp;errbuf );
00167   tidyRelease( tdoc );
00168   return rc;
00169 }
00170 </pre>
00171 ** @{
00172 */
00173 
00174 TIDY_EXPORT TidyDoc TIDY_CALL     tidyCreate(void);
00175 TIDY_EXPORT void TIDY_CALL        tidyRelease( TidyDoc tdoc );
00176 
00177 /** Let application store a chunk of data w/ each Tidy instance.
00178 **  Useful for callbacks.
00179 */
00180 TIDY_EXPORT void TIDY_CALL        tidySetAppData( TidyDoc tdoc, ulong appData );
00181 
00182 /** Get application data set previously */
00183 TIDY_EXPORT ulong TIDY_CALL       tidyGetAppData( TidyDoc tdoc );
00184 
00185 /** Get release date (version) for current library */
00186 TIDY_EXPORT ctmbstr TIDY_CALL     tidyReleaseDate(void);
00187 
00188 /* Diagnostics and Repair
00189 */
00190 
00191 /** Get status of current document. */
00192 TIDY_EXPORT int TIDY_CALL         tidyStatus( TidyDoc tdoc );
00193 
00194 /** Detected HTML version: 0, 2, 3 or 4 */
00195 TIDY_EXPORT int TIDY_CALL         tidyDetectedHtmlVersion( TidyDoc tdoc );
00196 
00197 /** Input is XHTML? */
00198 TIDY_EXPORT Bool TIDY_CALL        tidyDetectedXhtml( TidyDoc tdoc );
00199 
00200 /** Input is generic XML (not HTML or XHTML)? */
00201 TIDY_EXPORT Bool TIDY_CALL        tidyDetectedGenericXml( TidyDoc tdoc );
00202 
00203 /** Number of Tidy errors encountered.  If > 0, output is suppressed
00204 **  unless TidyForceOutput is set.
00205 */
00206 TIDY_EXPORT uint TIDY_CALL        tidyErrorCount( TidyDoc tdoc );
00207 
00208 /** Number of Tidy warnings encountered. */
00209 TIDY_EXPORT uint TIDY_CALL        tidyWarningCount( TidyDoc tdoc );
00210 
00211 /** Number of Tidy accessibility warnings encountered. */
00212 TIDY_EXPORT uint TIDY_CALL        tidyAccessWarningCount( TidyDoc tdoc );
00213 
00214 /** Number of Tidy configuration errors encountered. */
00215 TIDY_EXPORT uint TIDY_CALL        tidyConfigErrorCount( TidyDoc tdoc );
00216 
00217 /* Get/Set configuration options
00218 */
00219 /** Load an ASCII Tidy configuration file */
00220 TIDY_EXPORT int TIDY_CALL         tidyLoadConfig( TidyDoc tdoc, ctmbstr configFile );
00221 
00222 /** Load a Tidy configuration file with the specified character encoding */
00223 TIDY_EXPORT int TIDY_CALL         tidyLoadConfigEnc( TidyDoc tdoc, ctmbstr configFile,
00224                                            ctmbstr charenc );
00225 
00226 TIDY_EXPORT Bool TIDY_CALL        tidyFileExists( ctmbstr filename );
00227 
00228 
00229 /** Set the input/output character encoding for parsing markup.
00230 **  Values include: ascii, latin1, raw, utf8, iso2022, mac,
00231 **  win1252, utf16le, utf16be, utf16, big5 and shiftjis.  Case in-sensitive.
00232 */
00233 TIDY_EXPORT int TIDY_CALL         tidySetCharEncoding( TidyDoc tdoc, ctmbstr encnam );
00234 
00235 /** Set the input encoding for parsing markup.
00236 ** As for tidySetCharEncoding but only affects the input encoding
00237 **/
00238 TIDY_EXPORT int TIDY_CALL         tidySetInCharEncoding( TidyDoc tdoc, ctmbstr encnam );
00239 
00240 /** Set the output encoding.
00241 **/
00242 TIDY_EXPORT int TIDY_CALL         tidySetOutCharEncoding( TidyDoc tdoc, ctmbstr encnam );
00243 
00244 /** @} end Basic group */
00245 
00246 
00247 /** @defgroup Configuration Configuration Options
00248 **
00249 ** Functions for getting and setting Tidy configuration options.
00250 ** @{
00251 */
00252 
00253 /** Applications using TidyLib may want to augment command-line and
00254 **  configuration file options.  Setting this callback allows an application 
00255 **  developer to examine command-line and configuration file options after
00256 **  TidyLib has examined them and failed to recognize them.
00257 **/
00258 
00259 typedef Bool (TIDY_CALL *TidyOptCallback)( ctmbstr option, ctmbstr value );
00260 
00261 TIDY_EXPORT Bool TIDY_CALL          tidySetOptionCallback( TidyDoc tdoc, TidyOptCallback pOptCallback );
00262 
00263 /** Get option ID by name */
00264 TIDY_EXPORT TidyOptionId TIDY_CALL  tidyOptGetIdForName( ctmbstr optnam );
00265 
00266 /** Get iterator for list of option */
00267 /** 
00268 Example:
00269 <pre>
00270 TidyIterator itOpt = tidyGetOptionList( tdoc );
00271 while ( itOpt )
00272 {
00273   TidyOption opt = tidyGetNextOption( tdoc, &itOpt );
00274   .. get/set option values ..
00275 }
00276 </pre>
00277 */
00278 
00279 TIDY_EXPORT TidyIterator TIDY_CALL  tidyGetOptionList( TidyDoc tdoc );
00280 /** Get next Option */
00281 TIDY_EXPORT TidyOption TIDY_CALL    tidyGetNextOption( TidyDoc tdoc, TidyIterator* pos );
00282 
00283 /** Lookup option by ID */
00284 TIDY_EXPORT TidyOption TIDY_CALL    tidyGetOption( TidyDoc tdoc, TidyOptionId optId );
00285 /** Lookup option by name */
00286 TIDY_EXPORT TidyOption TIDY_CALL    tidyGetOptionByName( TidyDoc tdoc, ctmbstr optnam );
00287 
00288 /** Get ID of given Option */
00289 TIDY_EXPORT TidyOptionId TIDY_CALL  tidyOptGetId( TidyOption opt );
00290 
00291 /** Get name of given Option */
00292 TIDY_EXPORT ctmbstr TIDY_CALL       tidyOptGetName( TidyOption opt );
00293 
00294 /** Get datatype of given Option */
00295 TIDY_EXPORT TidyOptionType TIDY_CALL tidyOptGetType( TidyOption opt );
00296 
00297 /** Is Option read-only? */
00298 TIDY_EXPORT Bool TIDY_CALL          tidyOptIsReadOnly( TidyOption opt );
00299 
00300 /** Get category of given Option */
00301 TIDY_EXPORT TidyConfigCategory TIDY_CALL tidyOptGetCategory( TidyOption opt );
00302 
00303 /** Get default value of given Option as a string */
00304 TIDY_EXPORT ctmbstr TIDY_CALL       tidyOptGetDefault( TidyOption opt );
00305 
00306 /** Get default value of given Option as an unsigned integer */
00307 TIDY_EXPORT ulong TIDY_CALL         tidyOptGetDefaultInt( TidyOption opt );
00308 
00309 /** Get default value of given Option as a Boolean value */
00310 TIDY_EXPORT Bool TIDY_CALL          tidyOptGetDefaultBool( TidyOption opt );
00311 
00312 /** Iterate over Option "pick list" */
00313 TIDY_EXPORT TidyIterator TIDY_CALL  tidyOptGetPickList( TidyOption opt );
00314 /** Get next string value of Option "pick list" */
00315 TIDY_EXPORT ctmbstr TIDY_CALL       tidyOptGetNextPick( TidyOption opt, TidyIterator* pos );
00316 
00317 /** Get current Option value as a string */
00318 TIDY_EXPORT ctmbstr TIDY_CALL       tidyOptGetValue( TidyDoc tdoc, TidyOptionId optId );
00319 /** Set Option value as a string */
00320 TIDY_EXPORT Bool TIDY_CALL          tidyOptSetValue( TidyDoc tdoc, TidyOptionId optId, ctmbstr val );
00321 /** Set named Option value as a string.  Good if not sure of type. */
00322 TIDY_EXPORT Bool TIDY_CALL          tidyOptParseValue( TidyDoc tdoc, ctmbstr optnam, ctmbstr val );
00323 
00324 /** Get current Option value as an integer */
00325 TIDY_EXPORT ulong TIDY_CALL         tidyOptGetInt( TidyDoc tdoc, TidyOptionId optId );
00326 /** Set Option value as an integer */
00327 TIDY_EXPORT Bool TIDY_CALL          tidyOptSetInt( TidyDoc tdoc, TidyOptionId optId, ulong val );
00328 
00329 /** Get current Option value as a Boolean flag */
00330 TIDY_EXPORT Bool TIDY_CALL          tidyOptGetBool( TidyDoc tdoc, TidyOptionId optId );
00331 /** Set Option value as a Boolean flag */
00332 TIDY_EXPORT Bool TIDY_CALL          tidyOptSetBool( TidyDoc tdoc, TidyOptionId optId, Bool val );
00333 
00334 /** Reset option to default value by ID */
00335 TIDY_EXPORT Bool TIDY_CALL          tidyOptResetToDefault( TidyDoc tdoc, TidyOptionId opt );
00336 /** Reset all options to their default values */
00337 TIDY_EXPORT Bool TIDY_CALL          tidyOptResetAllToDefault( TidyDoc tdoc );
00338 
00339 /** Take a snapshot of current config settings */
00340 TIDY_EXPORT Bool TIDY_CALL          tidyOptSnapshot( TidyDoc tdoc );
00341 /** Reset config settings to snapshot (after document processing) */
00342 TIDY_EXPORT Bool TIDY_CALL          tidyOptResetToSnapshot( TidyDoc tdoc );
00343 
00344 /** Any settings different than default? */
00345 TIDY_EXPORT Bool TIDY_CALL          tidyOptDiffThanDefault( TidyDoc tdoc );
00346 /** Any settings different than snapshot? */
00347 TIDY_EXPORT Bool TIDY_CALL          tidyOptDiffThanSnapshot( TidyDoc tdoc );
00348 
00349 /** Copy current configuration settings from one document to another */
00350 TIDY_EXPORT Bool TIDY_CALL          tidyOptCopyConfig( TidyDoc tdocTo, TidyDoc tdocFrom );
00351 
00352 /** Get character encoding name.  Used with TidyCharEncoding,
00353 **  TidyOutCharEncoding, TidyInCharEncoding */
00354 TIDY_EXPORT ctmbstr TIDY_CALL       tidyOptGetEncName( TidyDoc tdoc, TidyOptionId optId );
00355 
00356 /** Get current pick list value for option by ID.  Useful for enum types. */
00357 TIDY_EXPORT ctmbstr TIDY_CALL       tidyOptGetCurrPick( TidyDoc tdoc, TidyOptionId optId);
00358 
00359 /** Iterate over user declared tags */
00360 TIDY_EXPORT TidyIterator TIDY_CALL  tidyOptGetDeclTagList( TidyDoc tdoc );
00361 /** Get next declared tag of specified type: TidyInlineTags, TidyBlockTags,
00362 **  TidyEmptyTags, TidyPreTags */
00363 TIDY_EXPORT ctmbstr TIDY_CALL       tidyOptGetNextDeclTag( TidyDoc tdoc, 
00364                                                           TidyOptionId optId,
00365                                                           TidyIterator* iter );
00366 /** Get option description */
00367 TIDY_EXPORT ctmbstr TIDY_CALL       tidyOptGetDoc( TidyDoc tdoc, TidyOption opt );
00368 
00369 /** Iterate over a list of related options */
00370 TIDY_EXPORT TidyIterator TIDY_CALL  tidyOptGetDocLinksList( TidyDoc tdoc,
00371                                                   TidyOption opt );
00372 /** Get next related option */
00373 TIDY_EXPORT TidyOption TIDY_CALL    tidyOptGetNextDocLinks( TidyDoc tdoc,
00374                                                   TidyIterator* pos );
00375 
00376 /** @} end Configuration group */
00377 
00378 /** @defgroup IO  I/O and Messages
00379 **
00380 ** By default, Tidy will define, create and use 
00381 ** instances of input and output handlers for 
00382 ** standard C buffered I/O (i.e. FILE* stdin,
00383 ** FILE* stdout and FILE* stderr for content
00384 ** input, content output and diagnostic output,
00385 ** respectively.  A FILE* cfgFile input handler
00386 ** will be used for config files.  Command line
00387 ** options will just be set directly.
00388 **
00389 ** @{
00390 */
00391 
00392 /*****************
00393    Input Source
00394 *****************/
00395 /** Input Callback: get next byte of input */
00396 typedef int  (TIDY_CALL *TidyGetByteFunc)( ulong sourceData );
00397 
00398 /** Input Callback: unget a byte of input */
00399 typedef void (TIDY_CALL *TidyUngetByteFunc)( ulong sourceData, byte bt );
00400 
00401 /** Input Callback: is end of input? */
00402 typedef Bool (TIDY_CALL *TidyEOFFunc)( ulong sourceData );
00403 
00404 /** End of input "character" */
00405 #define EndOfStream (~0u)
00406 
00407 /** TidyInputSource - Delivers raw bytes of input
00408 */
00409 TIDY_STRUCT
00410 typedef struct _TidyInputSource
00411 {
00412   /* Instance data */
00413   ulong               sourceData;  /**< Input context.  Passed to callbacks */
00414 
00415   /* Methods */
00416   TidyGetByteFunc     getByte;     /**< Pointer to "get byte" callback */
00417   TidyUngetByteFunc   ungetByte;   /**< Pointer to "unget" callback */
00418   TidyEOFFunc         eof;         /**< Pointer to "eof" callback */
00419 } TidyInputSource;
00420 
00421 /** Facilitates user defined source by providing
00422 **  an entry point to marshal pointers-to-functions.
00423 **  Needed by .NET and possibly other language bindings.
00424 */
00425 TIDY_EXPORT Bool TIDY_CALL tidyInitSource( TidyInputSource*  source,
00426                                           void*             srcData,
00427                                           TidyGetByteFunc   gbFunc,
00428                                           TidyUngetByteFunc ugbFunc,
00429                                           TidyEOFFunc       endFunc );
00430 
00431 /** Helper: get next byte from input source */
00432 TIDY_EXPORT uint TIDY_CALL tidyGetByte( TidyInputSource* source );
00433 
00434 /** Helper: unget byte back to input source */
00435 TIDY_EXPORT void TIDY_CALL tidyUngetByte( TidyInputSource* source, uint byteValue );
00436 
00437 /** Helper: check if input source at end */
00438 TIDY_EXPORT Bool TIDY_CALL tidyIsEOF( TidyInputSource* source );
00439 
00440 
00441 /****************
00442    Output Sink
00443 ****************/
00444 /** Output callback: send a byte to output */
00445 typedef void (TIDY_CALL *TidyPutByteFunc)( ulong sinkData, byte bt );
00446 
00447 
00448 /** TidyOutputSink - accepts raw bytes of output
00449 */
00450 TIDY_STRUCT
00451 typedef struct _TidyOutputSink
00452 {
00453   /* Instance data */
00454   ulong               sinkData;  /**< Output context.  Passed to callbacks */
00455 
00456   /* Methods */
00457   TidyPutByteFunc     putByte;   /**< Pointer to "put byte" callback */
00458 } TidyOutputSink;
00459 
00460 /** Facilitates user defined sinks by providing
00461 **  an entry point to marshal pointers-to-functions.
00462 **  Needed by .NET and possibly other language bindings.
00463 */
00464 TIDY_EXPORT Bool TIDY_CALL tidyInitSink( TidyOutputSink* sink, 
00465                                         void*           snkData,
00466                                         TidyPutByteFunc pbFunc );
00467 
00468 /** Helper: send a byte to output */
00469 TIDY_EXPORT void TIDY_CALL tidyPutByte( TidyOutputSink* sink, uint byteValue );
00470 
00471 
00472 /** Callback to filter messages by diagnostic level:
00473 **  info, warning, etc.  Just set diagnostic output 
00474 **  handler to redirect all diagnostics output.  Return true
00475 **  to proceed with output, false to cancel.
00476 */
00477 typedef Bool (TIDY_CALL *TidyReportFilter)( TidyDoc tdoc, TidyReportLevel lvl,
00478                                            uint line, uint col, ctmbstr mssg );
00479 
00480 /** Give Tidy a filter callback to use */
00481 TIDY_EXPORT Bool TIDY_CALL    tidySetReportFilter( TidyDoc tdoc,
00482                                                   TidyReportFilter filtCallback );
00483 
00484 /** Set error sink to named file */
00485 TIDY_EXPORT FILE* TIDY_CALL   tidySetErrorFile( TidyDoc tdoc, ctmbstr errfilnam );
00486 /** Set error sink to given buffer */
00487 TIDY_EXPORT int TIDY_CALL     tidySetErrorBuffer( TidyDoc tdoc, TidyBuffer* errbuf );
00488 /** Set error sink to given generic sink */
00489 TIDY_EXPORT int TIDY_CALL     tidySetErrorSink( TidyDoc tdoc, TidyOutputSink* sink );
00490 
00491 /** @} end IO group */
00492 
00493 
00494 /** @defgroup Memory  Memory Allocation
00495 **
00496 ** By default, Tidy will use its own wrappers
00497 ** around standard C malloc/free calls. 
00498 ** These wrappers will abort upon any failures.
00499 ** If any are set, all must be set.
00500 ** Pass NULL to clear previous setting.
00501 **
00502 ** May be used to set environment-specific allocators
00503 ** such as used by web server plugins, etc.
00504 **
00505 ** @{
00506 */
00507 
00508 /** Callback for "malloc" replacement */
00509 typedef void* (TIDY_CALL *TidyMalloc)( size_t len );
00510 /** Callback for "realloc" replacement */
00511 typedef void* (TIDY_CALL *TidyRealloc)( void* buf, size_t len );
00512 /** Callback for "free" replacement */
00513 typedef void  (TIDY_CALL *TidyFree)( void* buf );
00514 /** Callback for "out of memory" panic state */
00515 typedef void  (TIDY_CALL *TidyPanic)( ctmbstr mssg );
00516 
00517 /** Give Tidy a malloc() replacement */
00518 TIDY_EXPORT Bool TIDY_CALL        tidySetMallocCall( TidyMalloc fmalloc );
00519 /** Give Tidy a realloc() replacement */
00520 TIDY_EXPORT Bool TIDY_CALL        tidySetReallocCall( TidyRealloc frealloc );
00521 /** Give Tidy a free() replacement */
00522 TIDY_EXPORT Bool TIDY_CALL        tidySetFreeCall( TidyFree ffree );
00523 /** Give Tidy an "out of memory" handler */
00524 TIDY_EXPORT Bool TIDY_CALL        tidySetPanicCall( TidyPanic fpanic );
00525 
00526 /** @} end Memory group */
00527 
00528 /* TODO: Catalog all messages for easy translation
00529 TIDY_EXPORT ctmbstr     tidyLookupMessage( int errorNo );
00530 */
00531 
00532 
00533 
00534 /** @defgroup Parse Document Parse
00535 **
00536 ** Parse markup from a given input source.  String and filename 
00537 ** functions added for convenience.  HTML/XHTML version determined
00538 ** from input.
00539 ** @{
00540 */
00541 
00542 /** Parse markup in named file */
00543 TIDY_EXPORT int TIDY_CALL         tidyParseFile( TidyDoc tdoc, ctmbstr filename );
00544 
00545 /** Parse markup from the standard input */
00546 TIDY_EXPORT int TIDY_CALL         tidyParseStdin( TidyDoc tdoc );
00547 
00548 /** Parse markup in given string */
00549 TIDY_EXPORT int TIDY_CALL         tidyParseString( TidyDoc tdoc, ctmbstr content );
00550 
00551 /** Parse markup in given buffer */
00552 TIDY_EXPORT int TIDY_CALL         tidyParseBuffer( TidyDoc tdoc, TidyBuffer* buf );
00553 
00554 /** Parse markup in given generic input source */
00555 TIDY_EXPORT int TIDY_CALL         tidyParseSource( TidyDoc tdoc, TidyInputSource* source);
00556 
00557 /** @} End Parse group */
00558 
00559 
00560 /** @defgroup Clean Diagnostics and Repair
00561 **
00562 ** @{
00563 */
00564 /** Execute configured cleanup and repair operations on parsed markup */
00565 TIDY_EXPORT int TIDY_CALL         tidyCleanAndRepair( TidyDoc tdoc );
00566 
00567 /** Run configured diagnostics on parsed and repaired markup. 
00568 **  Must call tidyCleanAndRepair() first.
00569 */
00570 TIDY_EXPORT int TIDY_CALL         tidyRunDiagnostics( TidyDoc tdoc );
00571 
00572 /** @} end Clean group */
00573 
00574 
00575 /** @defgroup Save Document Save Functions
00576 **
00577 ** Save currently parsed document to the given output sink.  File name
00578 ** and string/buffer functions provided for convenience.
00579 ** @{
00580 */
00581 
00582 /** Save to named file */
00583 TIDY_EXPORT int TIDY_CALL         tidySaveFile( TidyDoc tdoc, ctmbstr filename );
00584 
00585 /** Save to standard output (FILE*) */
00586 TIDY_EXPORT int TIDY_CALL         tidySaveStdout( TidyDoc tdoc );
00587 
00588 /** Save to given TidyBuffer object */
00589 TIDY_EXPORT int TIDY_CALL         tidySaveBuffer( TidyDoc tdoc, TidyBuffer* buf );
00590 
00591 /** Save document to application buffer.  If buffer is not big enough,
00592 **  ENOMEM will be returned and the necessary buffer size will be placed
00593 **  in *buflen.
00594 */
00595 TIDY_EXPORT int TIDY_CALL         tidySaveString( TidyDoc tdoc,
00596                                                  tmbstr buffer, uint* buflen );
00597 
00598 /** Save to given generic output sink */
00599 TIDY_EXPORT int TIDY_CALL         tidySaveSink( TidyDoc tdoc, TidyOutputSink* sink );
00600 
00601 /** @} end Save group */
00602 
00603 
00604 /** @addtogroup Basic
00605 ** @{
00606 */
00607 /** Save current settings to named file.
00608     Only non-default values are written. */
00609 TIDY_EXPORT int TIDY_CALL         tidyOptSaveFile( TidyDoc tdoc, ctmbstr cfgfil );
00610 
00611 /** Save current settings to given output sink.
00612     Only non-default values are written. */
00613 TIDY_EXPORT int TIDY_CALL         tidyOptSaveSink( TidyDoc tdoc, TidyOutputSink* sink );
00614 
00615 
00616 /* Error reporting functions 
00617 */
00618 
00619 /** Write more complete information about errors to current error sink. */
00620 TIDY_EXPORT void TIDY_CALL        tidyErrorSummary( TidyDoc tdoc );
00621 
00622 /** Write more general information about markup to current error sink. */
00623 TIDY_EXPORT void TIDY_CALL        tidyGeneralInfo( TidyDoc tdoc );
00624 
00625 /** @} end Basic group (again) */
00626 
00627 
00628 /** @defgroup Tree Document Tree
00629 **
00630 ** A parsed and, optionally, repaired document is
00631 ** represented by Tidy as a Tree, much like a W3C DOM.
00632 ** This tree may be traversed using these functions.
00633 ** The following snippet gives a basic idea how these
00634 ** functions can be used.
00635 **
00636 <pre>
00637 void dumpNode( TidyNode tnod, int indent )
00638 {
00639   TidyNode child;
00640 
00641   for ( child = tidyGetChild(tnod); child; child = tidyGetNext(child) )
00642   {
00643     ctmbstr name;
00644     switch ( tidyNodeGetType(child) )
00645     {
00646     case TidyNode_Root:       name = "Root";                    break;
00647     case TidyNode_DocType:    name = "DOCTYPE";                 break;
00648     case TidyNode_Comment:    name = "Comment";                 break;
00649     case TidyNode_ProcIns:    name = "Processing Instruction";  break;
00650     case TidyNode_Text:       name = "Text";                    break;
00651     case TidyNode_CDATA:      name = "CDATA";                   break;
00652     case TidyNode_Section:    name = "XML Section";             break;
00653     case TidyNode_Asp:        name = "ASP";                     break;
00654     case TidyNode_Jste:       name = "JSTE";                    break;
00655     case TidyNode_Php:        name = "PHP";                     break;
00656     case TidyNode_XmlDecl:    name = "XML Declaration";         break;
00657 
00658     case TidyNode_Start:
00659     case TidyNode_End:
00660     case TidyNode_StartEnd:
00661     default:
00662       name = tidyNodeGetName( child );
00663       break;
00664     }
00665     assert( name != NULL );
00666     printf( "\%*.*sNode: \%s\\n", indent, indent, " ", name );
00667     dumpNode( child, indent + 4 );
00668   }
00669 }
00670 
00671 void dumpDoc( TidyDoc tdoc )
00672 {
00673   dumpNode( tidyGetRoot(tdoc), 0 );
00674 }
00675 
00676 void dumpBody( TidyDoc tdoc )
00677 {
00678   dumpNode( tidyGetBody(tdoc), 0 );
00679 }
00680 </pre>
00681 
00682 @{
00683 
00684 */
00685 
00686 TIDY_EXPORT TidyNode TIDY_CALL    tidyGetRoot( TidyDoc tdoc );
00687 TIDY_EXPORT TidyNode TIDY_CALL    tidyGetHtml( TidyDoc tdoc );
00688 TIDY_EXPORT TidyNode TIDY_CALL    tidyGetHead( TidyDoc tdoc );
00689 TIDY_EXPORT TidyNode TIDY_CALL    tidyGetBody( TidyDoc tdoc );
00690 
00691 /* parent / child */
00692 TIDY_EXPORT TidyNode TIDY_CALL    tidyGetParent( TidyNode tnod );
00693 TIDY_EXPORT TidyNode TIDY_CALL    tidyGetChild( TidyNode tnod );
00694 
00695 /* siblings */
00696 TIDY_EXPORT TidyNode TIDY_CALL    tidyGetNext( TidyNode tnod );
00697 TIDY_EXPORT TidyNode TIDY_CALL    tidyGetPrev( TidyNode tnod );
00698 
00699 /* Null for non-element nodes and all pure HTML
00700 TIDY_EXPORT ctmbstr     tidyNodeNsLocal( TidyNode tnod );
00701 TIDY_EXPORT ctmbstr     tidyNodeNsPrefix( TidyNode tnod );
00702 TIDY_EXPORT ctmbstr     tidyNodeNsUri( TidyNode tnod );
00703 */
00704 
00705 /* Iterate over attribute values */
00706 TIDY_EXPORT TidyAttr TIDY_CALL    tidyAttrFirst( TidyNode tnod );
00707 TIDY_EXPORT TidyAttr TIDY_CALL    tidyAttrNext( TidyAttr tattr );
00708 
00709 TIDY_EXPORT ctmbstr TIDY_CALL     tidyAttrName( TidyAttr tattr );
00710 TIDY_EXPORT ctmbstr TIDY_CALL     tidyAttrValue( TidyAttr tattr );
00711 
00712 /* Null for pure HTML
00713 TIDY_EXPORT ctmbstr     tidyAttrNsLocal( TidyAttr tattr );
00714 TIDY_EXPORT ctmbstr     tidyAttrNsPrefix( TidyAttr tattr );
00715 TIDY_EXPORT ctmbstr     tidyAttrNsUri( TidyAttr tattr );
00716 */
00717 
00718 /** @} end Tree group */
00719 
00720 
00721 /** @defgroup NodeAsk Node Interrogation
00722 **
00723 ** Get information about any givent node.
00724 ** @{
00725 */
00726 
00727 /* Node info */
00728 TIDY_EXPORT TidyNodeType TIDY_CALL tidyNodeGetType( TidyNode tnod );
00729 TIDY_EXPORT ctmbstr TIDY_CALL     tidyNodeGetName( TidyNode tnod );
00730 
00731 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsText( TidyNode tnod );
00732 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsProp( TidyDoc tdoc, TidyNode tnod );
00733 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsHeader( TidyNode tnod ); /* h1, h2, ... */
00734 
00735 TIDY_EXPORT Bool TIDY_CALL tidyNodeHasText( TidyDoc tdoc, TidyNode tnod );
00736 TIDY_EXPORT Bool TIDY_CALL tidyNodeGetText( TidyDoc tdoc, TidyNode tnod, TidyBuffer* buf );
00737 
00738 TIDY_EXPORT TidyTagId TIDY_CALL tidyNodeGetId( TidyNode tnod );
00739 
00740 TIDY_EXPORT uint TIDY_CALL tidyNodeLine( TidyNode tnod );
00741 TIDY_EXPORT uint TIDY_CALL tidyNodeColumn( TidyNode tnod );
00742 
00743 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsHTML( TidyNode tnod );
00744 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsHEAD( TidyNode tnod );
00745 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsTITLE( TidyNode tnod );
00746 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsBASE( TidyNode tnod );
00747 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsMETA( TidyNode tnod );
00748 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsBODY( TidyNode tnod );
00749 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsFRAMESET( TidyNode tnod );
00750 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsFRAME( TidyNode tnod );
00751 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsIFRAME( TidyNode tnod );
00752 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsNOFRAMES( TidyNode tnod );
00753 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsHR( TidyNode tnod );
00754 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsH1( TidyNode tnod );
00755 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsH2( TidyNode tnod );
00756 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsPRE( TidyNode tnod );
00757 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsLISTING( TidyNode tnod );
00758 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsP( TidyNode tnod );
00759 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsUL( TidyNode tnod );
00760 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsOL( TidyNode tnod );
00761 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsDL( TidyNode tnod );
00762 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsDIR( TidyNode tnod );
00763 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsLI( TidyNode tnod );
00764 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsDT( TidyNode tnod );
00765 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsDD( TidyNode tnod );
00766 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsTABLE( TidyNode tnod );
00767 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsCAPTION( TidyNode tnod );
00768 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsTD( TidyNode tnod );
00769 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsTH( TidyNode tnod );
00770 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsTR( TidyNode tnod );
00771 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsCOL( TidyNode tnod );
00772 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsCOLGROUP( TidyNode tnod );
00773 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsBR( TidyNode tnod );
00774 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsA( TidyNode tnod );
00775 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsLINK( TidyNode tnod );
00776 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsB( TidyNode tnod );
00777 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsI( TidyNode tnod );
00778 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsSTRONG( TidyNode tnod );
00779 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsEM( TidyNode tnod );
00780 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsBIG( TidyNode tnod );
00781 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsSMALL( TidyNode tnod );
00782 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsPARAM( TidyNode tnod );
00783 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsOPTION( TidyNode tnod );
00784 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsOPTGROUP( TidyNode tnod );
00785 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsIMG( TidyNode tnod );
00786 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsMAP( TidyNode tnod );
00787 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsAREA( TidyNode tnod );
00788 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsNOBR( TidyNode tnod );
00789 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsWBR( TidyNode tnod );
00790 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsFONT( TidyNode tnod );
00791 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsLAYER( TidyNode tnod );
00792 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsSPACER( TidyNode tnod );
00793 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsCENTER( TidyNode tnod );
00794 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsSTYLE( TidyNode tnod );
00795 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsSCRIPT( TidyNode tnod );
00796 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsNOSCRIPT( TidyNode tnod );
00797 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsFORM( TidyNode tnod );
00798 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsTEXTAREA( TidyNode tnod );
00799 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsBLOCKQUOTE( TidyNode tnod );
00800 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsAPPLET( TidyNode tnod );
00801 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsOBJECT( TidyNode tnod );
00802 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsDIV( TidyNode tnod );
00803 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsSPAN( TidyNode tnod );
00804 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsINPUT( TidyNode tnod );
00805 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsQ( TidyNode tnod );
00806 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsLABEL( TidyNode tnod );
00807 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsH3( TidyNode tnod );
00808 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsH4( TidyNode tnod );
00809 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsH5( TidyNode tnod );
00810 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsH6( TidyNode tnod );
00811 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsADDRESS( TidyNode tnod );
00812 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsXMP( TidyNode tnod );
00813 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsSELECT( TidyNode tnod );
00814 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsBLINK( TidyNode tnod );
00815 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsMARQUEE( TidyNode tnod );
00816 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsEMBED( TidyNode tnod );
00817 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsBASEFONT( TidyNode tnod );
00818 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsISINDEX( TidyNode tnod );
00819 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsS( TidyNode tnod );
00820 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsSTRIKE( TidyNode tnod );
00821 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsU( TidyNode tnod );
00822 TIDY_EXPORT Bool TIDY_CALL tidyNodeIsMENU( TidyNode tnod );
00823 
00824 /** @} End NodeAsk group */
00825 
00826 
00827 /** @defgroup Attribute Attribute Interrogation
00828 **
00829 ** Get information about any given attribute.
00830 ** @{
00831 */
00832 
00833 TIDY_EXPORT TidyAttrId TIDY_CALL tidyAttrGetId( TidyAttr tattr );
00834 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsEvent( TidyAttr tattr );
00835 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsProp( TidyAttr tattr );
00836 
00837 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsHREF( TidyAttr tattr );
00838 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsSRC( TidyAttr tattr );
00839 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsID( TidyAttr tattr );
00840 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsNAME( TidyAttr tattr );
00841 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsSUMMARY( TidyAttr tattr );
00842 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsALT( TidyAttr tattr );
00843 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsLONGDESC( TidyAttr tattr );
00844 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsUSEMAP( TidyAttr tattr );
00845 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsISMAP( TidyAttr tattr );
00846 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsLANGUAGE( TidyAttr tattr );
00847 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsTYPE( TidyAttr tattr );
00848 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsVALUE( TidyAttr tattr );
00849 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsCONTENT( TidyAttr tattr );
00850 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsTITLE( TidyAttr tattr );
00851 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsXMLNS( TidyAttr tattr );
00852 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsDATAFLD( TidyAttr tattr );
00853 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsWIDTH( TidyAttr tattr );
00854 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsHEIGHT( TidyAttr tattr );
00855 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsFOR( TidyAttr tattr );
00856 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsSELECTED( TidyAttr tattr );
00857 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsCHECKED( TidyAttr tattr );
00858 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsLANG( TidyAttr tattr );
00859 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsTARGET( TidyAttr tattr );
00860 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsHTTP_EQUIV( TidyAttr tattr );
00861 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsREL( TidyAttr tattr );
00862 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnMOUSEMOVE( TidyAttr tattr );
00863 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnMOUSEDOWN( TidyAttr tattr );
00864 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnMOUSEUP( TidyAttr tattr );
00865 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnCLICK( TidyAttr tattr );
00866 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnMOUSEOVER( TidyAttr tattr );
00867 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnMOUSEOUT( TidyAttr tattr );
00868 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnKEYDOWN( TidyAttr tattr );
00869 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnKEYUP( TidyAttr tattr );
00870 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnKEYPRESS( TidyAttr tattr );
00871 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnFOCUS( TidyAttr tattr );
00872 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnBLUR( TidyAttr tattr );
00873 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsBGCOLOR( TidyAttr tattr );
00874 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsLINK( TidyAttr tattr );
00875 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsALINK( TidyAttr tattr );
00876 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsVLINK( TidyAttr tattr );
00877 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsTEXT( TidyAttr tattr );
00878 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsSTYLE( TidyAttr tattr );
00879 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsABBR( TidyAttr tattr );
00880 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsCOLSPAN( TidyAttr tattr );
00881 TIDY_EXPORT Bool TIDY_CALL tidyAttrIsROWSPAN( TidyAttr tattr );
00882 
00883 /** @} end AttrAsk group */
00884 
00885 
00886 /** @defgroup AttrGet Attribute Retrieval
00887 **
00888 ** Lookup an attribute from a given node
00889 ** @{
00890 */
00891 
00892 
00893 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetHREF( TidyNode tnod );
00894 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetSRC( TidyNode tnod );
00895 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetID( TidyNode tnod );
00896 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetNAME( TidyNode tnod );
00897 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetSUMMARY( TidyNode tnod );
00898 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetALT( TidyNode tnod );
00899 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetLONGDESC( TidyNode tnod );
00900 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetUSEMAP( TidyNode tnod );
00901 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetISMAP( TidyNode tnod );
00902 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetLANGUAGE( TidyNode tnod );
00903 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetTYPE( TidyNode tnod );
00904 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetVALUE( TidyNode tnod );
00905 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetCONTENT( TidyNode tnod );
00906 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetTITLE( TidyNode tnod );
00907 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetXMLNS( TidyNode tnod );
00908 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetDATAFLD( TidyNode tnod );
00909 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetWIDTH( TidyNode tnod );
00910 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetHEIGHT( TidyNode tnod );
00911 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetFOR( TidyNode tnod );
00912 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetSELECTED( TidyNode tnod );
00913 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetCHECKED( TidyNode tnod );
00914 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetLANG( TidyNode tnod );
00915 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetTARGET( TidyNode tnod );
00916 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetHTTP_EQUIV( TidyNode tnod );
00917 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetREL( TidyNode tnod );
00918 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetOnMOUSEMOVE( TidyNode tnod );
00919 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetOnMOUSEDOWN( TidyNode tnod );
00920 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetOnMOUSEUP( TidyNode tnod );
00921 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetOnCLICK( TidyNode tnod );
00922 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetOnMOUSEOVER( TidyNode tnod );
00923 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetOnMOUSEOUT( TidyNode tnod );
00924 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetOnKEYDOWN( TidyNode tnod );
00925 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetOnKEYUP( TidyNode tnod );
00926 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetOnKEYPRESS( TidyNode tnod );
00927 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetOnFOCUS( TidyNode tnod );
00928 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetOnBLUR( TidyNode tnod );
00929 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetBGCOLOR( TidyNode tnod );
00930 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetLINK( TidyNode tnod );
00931 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetALINK( TidyNode tnod );
00932 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetVLINK( TidyNode tnod );
00933 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetTEXT( TidyNode tnod );
00934 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetSTYLE( TidyNode tnod );
00935 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetABBR( TidyNode tnod );
00936 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetCOLSPAN( TidyNode tnod );
00937 TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetROWSPAN( TidyNode tnod );
00938 
00939 
00940 /** @} end AttrGet group */
00941 
00942 #ifdef __cplusplus
00943 }  /* extern "C" */
00944 #endif
00945 #endif /* __TIDY_H__ */

Generated on Mon Nov 27 21:04:05 2006 for HTML Tidy by  doxygen 1.3.9.1