HTML-Valid
view release on metacpan or search on metacpan
tidy-html5.h view on Meta::CPAN
** These enumerators are used to define available configuration options and
** their option categories.
**
** @{ */
/** Option IDs are used used to get and/or set configuration option values and
** retrieve their descriptions.
**
** @remark These enum members all have associated localized strings available
** which describe the purpose of the option. These descriptions are
** available via their enum values only.
**
** @sa `config.c:option_defs[]` for internal implementation details; that
** array is where you will implement options defined in this enum; and
** it's important to add a string describing the option to
** `language_en.h`, too.
*/
typedef enum
{
TidyUnknownOption = 0, /**< Unknown option! */
TidyAccessibilityCheckLevel, /**< Accessibility check level */
TidyAltText, /**< Default text for alt attribute */
TidyAnchorAsName, /**< Define anchors as name attributes */
TidyAsciiChars, /**< Convert quotes and dashes to nearest ASCII char */
TidyBlockTags, /**< Declared block tags */
TidyBodyOnly, /**< Output BODY content only */
TidyBreakBeforeBR, /**< Output newline before <br> or not? */
TidyCharEncoding, /**< In/out character encoding */
TidyCoerceEndTags, /**< Coerce end tags from start tags where probably intended */
TidyCSSPrefix, /**< CSS class naming for clean option */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
TidyCustomTags, /**< Internal use ONLY */
#endif
TidyDecorateInferredUL, /**< Mark inferred UL elements with no indent CSS */
TidyDoctype, /**< User specified doctype */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
TidyDoctypeMode, /**< Internal use ONLY */
#endif
TidyDropEmptyElems, /**< Discard empty elements */
TidyDropEmptyParas, /**< Discard empty p elements */
TidyDropPropAttrs, /**< Discard proprietary attributes */
TidyDuplicateAttrs, /**< Keep first or last duplicate attribute */
TidyEmacs, /**< If true, format error output for GNU Emacs */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
TidyEmacsFile, /**< Internal use ONLY */
#endif
TidyEmptyTags, /**< Declared empty tags */
TidyEncloseBlockText, /**< If yes text in blocks is wrapped in P's */
TidyEncloseBodyText, /**< If yes text at body is wrapped in P's */
TidyErrFile, /**< File name to write errors to */
TidyEscapeCdata, /**< Replace <![CDATA[]]> sections with escaped text */
TidyEscapeScripts, /**< Escape items that look like closing tags in script tags */
TidyFixBackslash, /**< Fix URLs by replacing \ with / */
TidyFixComments, /**< Fix comments with adjacent hyphens */
TidyFixUri, /**< Applies URI encoding if necessary */
TidyForceOutput, /**< Output document even if errors were found */
TidyGDocClean, /**< Clean up HTML exported from Google Docs */
TidyHideComments, /**< Hides all (real) comments in output */
TidyHtmlOut, /**< Output plain HTML, even for XHTML input.*/
TidyInCharEncoding, /**< Input character encoding (if different) */
TidyIndentAttributes, /**< Newline+indent before each attribute */
TidyIndentCdata, /**< Indent <!CDATA[ ... ]]> section */
TidyIndentContent, /**< Indent content of appropriate tags */
TidyIndentSpaces, /**< Indentation n spaces/tabs */
TidyInlineTags, /**< Declared inline tags */
TidyJoinClasses, /**< Join multiple class attributes */
TidyJoinStyles, /**< Join multiple style attributes */
TidyKeepFileTimes, /**< If yes last modied time is preserved */
TidyKeepTabs, /**< If yes keep input source tabs */
TidyLiteralAttribs, /**< If true attributes may use newlines */
TidyLogicalEmphasis, /**< Replace i by em and b by strong */
TidyLowerLiterals, /**< Folds known attribute values to lower case */
TidyMakeBare, /**< Replace smart quotes, em dashes, etc with ASCII */
TidyMakeClean, /**< Replace presentational clutter by style rules */
TidyMark, /**< Add meta element indicating tidied doc */
TidyMergeDivs, /**< Merge multiple DIVs */
TidyMergeEmphasis, /**< Merge nested B and I elements */
TidyMergeSpans, /**< Merge multiple SPANs */
TidyMetaCharset, /**< Adds/checks/fixes meta charset in the head, based on document type */
TidyMuteReports, /**< Filter these messages from output. */
TidyMuteShow, /**< Show message ID's in the error table */
TidyNCR, /**< Allow numeric character references */
TidyNewline, /**< Output line ending (default to platform) */
TidyNumEntities, /**< Use numeric entities */
TidyOmitOptionalTags, /**< Suppress optional start tags and end tags */
TidyOutCharEncoding, /**< Output character encoding (if different) */
TidyOutFile, /**< File name to write markup to */
TidyOutputBOM, /**< Output a Byte Order Mark (BOM) for UTF-16 encodings */
TidyPPrintTabs, /**< Indent using tabs istead of spaces */
TidyPreserveEntities, /**< Preserve entities */
TidyPreTags, /**< Declared pre tags */
TidyPriorityAttributes, /**< Attributes to place first in an element */
TidyPunctWrap, /**< consider punctuation and breaking spaces for wrapping */
TidyQuiet, /**< No 'Parsing X', guessed DTD or summary */
TidyQuoteAmpersand, /**< Output naked ampersand as & */
TidyQuoteMarks, /**< Output " marks as " */
TidyQuoteNbsp, /**< Output non-breaking space as entity */
TidyReplaceColor, /**< Replace hex color attribute values with names */
TidyShowErrors, /**< Number of errors to put out */
TidyShowFilename, /**< If true, the input filename is displayed with the error messages */
TidyShowInfo, /**< If true, info-level messages are shown */
TidyShowMarkup, /**< If false, normal output is suppressed */
TidyShowMetaChange, /**< show when meta http-equiv content charset was changed - compatibility */
TidyShowWarnings, /**< However errors are always shown */
TidySkipNested, /**< Skip nested tags in script and style CDATA */
TidySortAttributes, /**< Sort attributes */
TidyStrictTagsAttr, /**< Ensure tags and attributes match output HTML version */
TidyStyleTags, /**< Move sytle to head */
TidyTabSize, /**< Expand tabs to n spaces */
TidyUpperCaseAttrs, /**< Output attributes in upper not lower case */
TidyUpperCaseTags, /**< Output tags in upper not lower case */
TidyUseCustomTags, /**< Enable Tidy to use autonomous custom tags */
TidyVertSpace, /**< degree to which markup is spread out vertically */
TidyWarnPropAttrs, /**< Warns on proprietary attributes */
TidyWord2000, /**< Draconian cleaning for Word2000 */
TidyWrapAsp, /**< Wrap within ASP pseudo elements */
TidyWrapAttVals, /**< Wrap within attribute values */
TidyWrapJste, /**< Wrap within JSTE pseudo elements */
TidyWrapLen, /**< Wrap margin */
tidy-html5.h view on Meta::CPAN
/** Allows the host application to store a chunk of data with each TidyDoc
** instance. This can be useful for callbacks, such as saving a reference to
** `self` within the document.
*/
TIDY_EXPORT void TIDY_CALL tidySetAppData(TidyDoc tdoc, /**< The document in which to store the data. */
void* appData /**< The pointer to a block of data to store. */
);
/** Returns the data previously stored with `tidySetAppData()`.
** @param tdoc document where data has been stored.
** @result The pointer to the data block previously stored.
*/
TIDY_EXPORT void* TIDY_CALL tidyGetAppData(TidyDoc tdoc);
/** @}
** @name LibTidy Version Information
** @{
*/
/** Get the release date for the current library.
** @result The string representing the release date.
*/
TIDY_EXPORT ctmbstr TIDY_CALL tidyReleaseDate(void);
/** Get the version number for the current library.
** @result The string representing the version number.
*/
TIDY_EXPORT ctmbstr TIDY_CALL tidyLibraryVersion(void);
/** Get the platform for which Tidy was built.
** @result The string representing the version number.
*/
TIDY_EXPORT ctmbstr TIDY_CALL tidyPlatform(void);
/** @}
** @name Diagnostics and Repair
** @{
*/
/** Get status of current document.
** @param tdoc An instance of a TidyDoc to query.
** @result Returns the highest of `2` indicating that errors were present in
** the document, `1` indicating warnings, and `0` in the case of
** everything being okay.
*/
TIDY_EXPORT int TIDY_CALL tidyStatus( TidyDoc tdoc );
/** Gets the version of HTML that was output, as an integer, times 100. For
** example, HTML5 will return 500; HTML4.0.1 will return 401.
** @param tdoc An instance of a TidyDoc to query.
** @result Returns the HTML version number (x100).
*/
TIDY_EXPORT int TIDY_CALL tidyDetectedHtmlVersion( TidyDoc tdoc );
/** Indicates whether the output document is or isn't XHTML.
** @param tdoc An instance of a TidyDoc to query.
** @result Returns `yes` if the document is an XHTML type.
*/
TIDY_EXPORT Bool TIDY_CALL tidyDetectedXhtml( TidyDoc tdoc );
/** Indicates whether or not the input document was XML. If TidyXml tags is
** true, or there was an XML declaration in the input document, then this
** function will return yes.
** @param tdoc An instance of a TidyDoc to query.
** @result Returns `yes` if the input document was XML.
*/
TIDY_EXPORT Bool TIDY_CALL tidyDetectedGenericXml( TidyDoc tdoc );
/** Indicates the number of TidyError messages that were generated. For any
** value greater than `0`, output is suppressed unless TidyForceOutput is set.
** @param tdoc An instance of a TidyDoc to query.
** @result Returns the number of TidyError messages that were generated.
*/
TIDY_EXPORT unsigned int TIDY_CALL tidyErrorCount( TidyDoc tdoc );
/** Indicates the number of TidyWarning messages that were generated.
** @param tdoc An instance of a TidyDoc to query.
** @result Returns the number of TidyWarning messages that were generated.
*/
TIDY_EXPORT unsigned int TIDY_CALL tidyWarningCount( TidyDoc tdoc );
/** Indicates the number of TidyAccess messages that were generated.
** @param tdoc An instance of a TidyDoc to query.
** @result Returns the number of TidyAccess messages that were generated.
*/
TIDY_EXPORT unsigned int TIDY_CALL tidyAccessWarningCount( TidyDoc tdoc );
/** Indicates the number of configuration error messages that were generated.
** @param tdoc An instance of a TidyDoc to query.
** @result Returns the number of configuration error messages that were
** generated.
*/
TIDY_EXPORT unsigned int TIDY_CALL tidyConfigErrorCount( TidyDoc tdoc );
/** Write more complete information about errors to current error sink.
** @param tdoc An instance of a TidyDoc to query.
*/
TIDY_EXPORT void TIDY_CALL tidyErrorSummary( TidyDoc tdoc );
/** Write more general information about markup to current error sink.
** @param tdoc An instance of a TidyDoc to query.
*/
TIDY_EXPORT void TIDY_CALL tidyGeneralInfo( TidyDoc tdoc );
/** @}
** @name Configuration, File, and Encoding Operations
** @{
*/
/** Load an ASCII Tidy configuration file and set the configuration per its
** contents. Reports config option errors, which can be filtered.
** @result Returns 0 upon success, or any other value if there was an option error.
*/
TIDY_EXPORT int TIDY_CALL tidyLoadConfig(TidyDoc tdoc, /**< The TidyDoc to which to apply the configuration. */
ctmbstr configFile /**< The complete path to the file to load. */
tidy-html5.h view on Meta::CPAN
);
/** Returns the unsigned integer value of the given message argument. An
** assertion will be generated if the argument type is not an unsigned int.
** @result Returns the unsigned integer value of the given argument.
*/
TIDY_EXPORT unsigned int TIDY_CALL tidyGetArgValueUInt(TidyMessage tmessage, /**< The message whose arguments you want to access. */
TidyMessageArgument* arg /**< The argument that you are querying. */
);
/** Returns the integer value of the given message argument. An assertion
** will be generated if the argument type is not an integer.
** @result Returns the integer value of the given argument.
*/
TIDY_EXPORT int TIDY_CALL tidyGetArgValueInt(TidyMessage tmessage, /**< The message whose arguments you want to access. */
TidyMessageArgument* arg /**< The argument that you are querying. */
);
/**
* Returns the double value of the given message argument. An assertion
* will be generated if the argument type is not a double.
** @result Returns the double value of the given argument.
*/
TIDY_EXPORT double TIDY_CALL tidyGetArgValueDouble(TidyMessage tmessage, /**< The message whose arguments you want to access. */
TidyMessageArgument* arg /**< The argument that you are querying. */
);
/** @} end subgroup TidyMessageCallback Arguments API */
/** @name Printing
** LibTidy applications can somewhat track the progress of the tidying process
** by using this provided callback. It relates where something in the source
** document ended up in the output.
** @{
*/
/** This typedef represents the required signature for your provided callback
** function should you wish to register one with tidySetMessageCallback().
** Your callback function will be provided with the following parameters.
** @param tdoc Indicates the source tidy document.
** @param line Indicates the line in the source document at this point in the process.
** @param col Indicates the column in the source document at this point in the process.
** @param destLine Indicates the line number in the output document at this point in the process.
*/
typedef void (TIDY_CALL *TidyPPProgress)( TidyDoc tdoc, unsigned int line, unsigned int col, unsigned int destLine );
/** This function informs Tidy to use the specified callback for tracking the
** pretty-printing process progress.
*/
TIDY_EXPORT Bool TIDY_CALL tidySetPrettyPrinterCallback(TidyDoc tdoc,
TidyPPProgress callback
);
/** @} */
/** @} end IO group */
/* MARK: - Document Parse */
/***************************************************************************//**
** @defgroup Parse Document Parse
**
** Functions for parsing markup from a given input source, as well as string
** and filename functions for added convenience. HTML/XHTML version determined
** from input.
**
** @{
******************************************************************************/
/** Parse markup in named file.
** @result Returns the highest of `2` indicating that errors were present in
** the document, `1` indicating warnings, and `0` in the case of
** everything being okay.
*/
TIDY_EXPORT int TIDY_CALL tidyParseFile(TidyDoc tdoc, /**< The tidy document to use for parsing. */
ctmbstr filename /**< The filename to parse. */
);
/** Parse markup from the standard input.
** @param tdoc The tidy document to use for parsing.
** @result Returns the highest of `2` indicating that errors were present in
** the document, `1` indicating warnings, and `0` in the case of
** everything being okay.
*/
TIDY_EXPORT int TIDY_CALL tidyParseStdin( TidyDoc tdoc );
/** Parse markup in given string. Note that the supplied string is of type
** `ctmbstr` based on `char` and therefore doesn't support the use of
** UTF-16 strings. Use `tidyParseBuffer()` if parsing multibyte strings.
** @result Returns the highest of `2` indicating that errors were present in
** the document, `1` indicating warnings, and `0` in the case of
** everything being okay.
*/
TIDY_EXPORT int TIDY_CALL tidyParseString(TidyDoc tdoc, /**< The tidy document to use for parsing. */
ctmbstr content /**< The string to parse. */
);
/** Parse markup in given buffer.
** @result Returns the highest of `2` indicating that errors were present in
** the document, `1` indicating warnings, and `0` in the case of
** everything being okay.
*/
TIDY_EXPORT int TIDY_CALL tidyParseBuffer(TidyDoc tdoc, /**< The tidy document to use for parsing. */
TidyBuffer* buf /**< The TidyBuffer containing data to parse. */
);
/** Parse markup in given generic input source.
** @result Returns the highest of `2` indicating that errors were present in
** the document, `1` indicating warnings, and `0` in the case of
** everything being okay.
*/
TIDY_EXPORT int TIDY_CALL tidyParseSource(TidyDoc tdoc, /**< The tidy document to use for parsing. */
TidyInputSource* source /**< A TidyInputSource containing data to parse. */
);
/** @} End Parse group */
/* MARK: - Diagnostics and Repair */
/***************************************************************************//**
** @defgroup Clean Diagnostics and Repair
**
** After parsing the document, you can use these functions to attempt cleanup,
** repair, get additional diagnostics, and determine the document type.
** @{
( run in 0.825 second using v1.01-cache-2.11-cpan-385001e3568 )