HTML Tidy  5.6.0
The HTACG Tidy HTML Project
HTML Tags

Detailed Description

This module organizes all of Tidy's HTML tag operations, such as parsing tags, defining tags, and user-defined tags.

Data Structures

struct  Dict
 Defines a dictionary entry for a single Tidy tag, including all of the relevant information that it requires. More...
 
struct  DictHash
 This structure provide hash lookup for Tidy tags. More...
 
struct  TidyTagImpl
 This structure consists of the lists of all tags known to Tidy. More...
 

Basic Structures and Tag Operations.

These structures form the backbone of Tidy tag processing, and the functions in this group provide basic operations with tags and nodes.

enum  UserTagType {
  tagtype_null = 0,
  tagtype_empty = 1,
  tagtype_inline = 2,
  tagtype_block = 4,
  tagtype_pre = 8
}
 This enumeration defines the types of user-defined tags that can be created. More...
 
enum  { ELEMENT_HASH_SIZE =178u }
 This enum indicates the maximum size of the has table for tag hash lookup. More...
 
typedef void( Parser) (TidyDocImpl *doc, Node *node, GetTokenMode mode)
 This typedef describes a function to be used to parse HTML of a Tidy tag. More...
 
typedef void( CheckAttribs) (TidyDocImpl *doc, Node *node)
 This typedef describes a function be be used to check the attributes of a Tidy tag. More...
 
void TY_❪DeclareUserTag❫ (TidyDocImpl *doc, const TidyOptionImpl *opt, ctmbstr name)
 Coordinates Config update and Tags data. More...
 
const Dict * TY_❪LookupTagDef❫ (TidyTagId tid)
 Interface for finding a tag by TidyTagId. More...
 
Bool TY_❪FindTag❫ (TidyDocImpl *doc, Node *node)
 Assigns the node's tag. More...
 
ParserTY_❪FindParser❫ (TidyDocImpl *doc, Node *node)
 Finds the parser function for a given node. More...
 
void TY_❪DefineTag❫ (TidyDocImpl *doc, UserTagType tagType, ctmbstr name)
 Defines a new user-defined tag. More...
 
void TY_❪FreeDeclaredTags❫ (TidyDocImpl *doc, UserTagType tagType)
 Frees user-defined tags of the given type, or all user tags in given tagtype_null. More...
 
TidyIterator TY_❪GetDeclaredTagList❫ (TidyDocImpl *doc)
 Initiates an iterator for a list of user-declared tags, including autonomous custom tags detected in the document if TidyUseCustomTags is not set to no. More...
 
ctmbstr TY_❪GetNextDeclaredTag❫ (TidyDocImpl *doc, UserTagType tagType, TidyIterator *iter)
 Given a valid TidyIterator initiated with TY_(GetDeclaredTagList)(), returns a string representing a user-declared or autonomous custom tag. More...
 
void TY_❪InitTags❫ (TidyDocImpl *doc)
 Initializes tags and tag structures for the given Tidy document. More...
 
void TY_❪FreeTags❫ (TidyDocImpl *doc)
 Frees the tags and structures used by Tidy for tags. More...
 
void TY_❪AdjustTags❫ (TidyDocImpl *doc)
 Tidy defaults to HTML5 mode. More...
 
void TY_❪ResetTags❫ (TidyDocImpl *doc)
 Reset the tags table back to default HTML5 mode. More...
 
Bool TY_❪IsHTML5Mode❫ (TidyDocImpl *doc)
 Indicates whether or not the Tidy is procesing in HTML5 mode. More...
 

Parser Methods And Attribute Checker Functions for Tags

These functions define the parsers and attribute checking functions for each of Tidy's tags.

Parser TY_❪ParseHTML❫
 
Parser TY_❪ParseHead❫
 
Parser TY_❪ParseTitle❫
 
Parser TY_❪ParseScript❫
 
Parser TY_❪ParseFrameSet❫
 
Parser TY_❪ParseNoFrames❫
 
Parser TY_❪ParseBody❫
 
Parser TY_❪ParsePre❫
 
Parser TY_❪ParseList❫
 
Parser TY_❪ParseDefList❫
 
Parser TY_❪ParseBlock❫
 
Parser TY_❪ParseInline❫
 
Parser TY_❪ParseEmpty❫
 
Parser TY_❪ParseTableTag❫
 
Parser TY_❪ParseColGroup❫
 
Parser TY_❪ParseRowGroup❫
 
Parser TY_❪ParseRow❫
 
Parser TY_❪ParseSelect❫
 
Parser TY_❪ParseOptGroup❫
 
Parser TY_❪ParseText❫
 
Parser TY_❪ParseDatalist❫
 
Parser TY_❪ParseNamespace❫
 
CheckAttribs TY_❪CheckAttributes❫
 

Other Tag and Node Lookup Functions

These functions perform additional lookup on tags and nodes.

Bool TY_❪nodeIsText❫ (Node *node)
 Inquires whether or not the given node is a text node. More...
 
Bool TY_❪nodeIsElement❫ (Node *node)
 Inquires whether or not the given node is an element node. More...
 
Bool TY_❪nodeHasText❫ (TidyDocImpl *doc, Node *node)
 Inquires whether or not the given node has any text. More...
 
Bool TY_❪elementIsAutonomousCustomFormat❫ (ctmbstr element)
 Inquires whether the given element looks like it's an autonomous custom element tag. More...
 
Bool TY_❪nodeIsAutonomousCustomFormat❫ (Node *node)
 Inquires whether the given node looks like it's an autonomous custom element tag. More...
 
Bool TY_❪nodeIsAutonomousCustomTag❫ (TidyDocImpl *doc, Node *node)
 True if the node looks like it's an autonomous custom element tag, and TidyCustomTags is not disabled, and we're in HTML5 mode, which are all requirements for valid autonomous custom tags. More...
 
Bool TY_❪nodeHasCM❫ (Node *node, uint contentModel)
 Does the node have the indicated content model? True if any of the bits requested are set. More...
 
Bool TY_❪nodeCMIsBlock❫ (Node *node)
 Does the content model of the node include block? More...
 
Bool TY_❪nodeCMIsInline❫ (Node *node)
 Does the content model of the node include inline? More...
 
Bool TY_❪nodeCMIsEmpty❫ (Node *node)
 Does the content model of the node include empty? More...
 
Bool TY_❪nodeIsHeader❫ (Node *node)
 Is the node a header, such as H1, H2, ..., H6? More...
 
uint TY_❪nodeHeaderLevel❫ (Node *node)
 Inquires as to the header level of the given node: 1, 2, ..., 6. More...
 
#define TagId(node)    ((node) && (node)->tag ? (node)->tag->id : TidyTag_UNKNOWN)
 Gets the TidyTagId of the given node. More...
 
#define TagIsId(node, tid)   ((node) && (node)->tag && (node)->tag->id == tid)
 Determines if the given node is of the given tag id type. More...
 
#define nodeIsHTML(node)    TagIsId( node, TidyTag_HTML )
 
#define nodeIsHEAD(node)    TagIsId( node, TidyTag_HEAD )
 
#define nodeIsTITLE(node)    TagIsId( node, TidyTag_TITLE )
 
#define nodeIsBASE(node)    TagIsId( node, TidyTag_BASE )
 
#define nodeIsMETA(node)    TagIsId( node, TidyTag_META )
 
#define nodeIsBODY(node)    TagIsId( node, TidyTag_BODY )
 
#define nodeIsFRAMESET(node)    TagIsId( node, TidyTag_FRAMESET )
 
#define nodeIsFRAME(node)    TagIsId( node, TidyTag_FRAME )
 
#define nodeIsIFRAME(node)    TagIsId( node, TidyTag_IFRAME )
 
#define nodeIsNOFRAMES(node)    TagIsId( node, TidyTag_NOFRAMES )
 
#define nodeIsHR(node)    TagIsId( node, TidyTag_HR )
 
#define nodeIsH1(node)    TagIsId( node, TidyTag_H1 )
 
#define nodeIsH2(node)    TagIsId( node, TidyTag_H2 )
 
#define nodeIsPRE(node)    TagIsId( node, TidyTag_PRE )
 
#define nodeIsLISTING(node)    TagIsId( node, TidyTag_LISTING )
 
#define nodeIsP(node)    TagIsId( node, TidyTag_P )
 
#define nodeIsUL(node)    TagIsId( node, TidyTag_UL )
 
#define nodeIsOL(node)    TagIsId( node, TidyTag_OL )
 
#define nodeIsDL(node)    TagIsId( node, TidyTag_DL )
 
#define nodeIsDIR(node)    TagIsId( node, TidyTag_DIR )
 
#define nodeIsLI(node)    TagIsId( node, TidyTag_LI )
 
#define nodeIsDT(node)    TagIsId( node, TidyTag_DT )
 
#define nodeIsDD(node)    TagIsId( node, TidyTag_DD )
 
#define nodeIsTABLE(node)    TagIsId( node, TidyTag_TABLE )
 
#define nodeIsCAPTION(node)    TagIsId( node, TidyTag_CAPTION )
 
#define nodeIsTD(node)    TagIsId( node, TidyTag_TD )
 
#define nodeIsTH(node)    TagIsId( node, TidyTag_TH )
 
#define nodeIsTR(node)    TagIsId( node, TidyTag_TR )
 
#define nodeIsCOL(node)    TagIsId( node, TidyTag_COL )
 
#define nodeIsCOLGROUP(node)    TagIsId( node, TidyTag_COLGROUP )
 
#define nodeIsBR(node)    TagIsId( node, TidyTag_BR )
 
#define nodeIsA(node)    TagIsId( node, TidyTag_A )
 
#define nodeIsLINK(node)    TagIsId( node, TidyTag_LINK )
 
#define nodeIsB(node)    TagIsId( node, TidyTag_B )
 
#define nodeIsI(node)    TagIsId( node, TidyTag_I )
 
#define nodeIsSTRONG(node)    TagIsId( node, TidyTag_STRONG )
 
#define nodeIsEM(node)    TagIsId( node, TidyTag_EM )
 
#define nodeIsBIG(node)    TagIsId( node, TidyTag_BIG )
 
#define nodeIsSMALL(node)    TagIsId( node, TidyTag_SMALL )
 
#define nodeIsPARAM(node)    TagIsId( node, TidyTag_PARAM )
 
#define nodeIsOPTION(node)    TagIsId( node, TidyTag_OPTION )
 
#define nodeIsOPTGROUP(node)    TagIsId( node, TidyTag_OPTGROUP )
 
#define nodeIsIMG(node)    TagIsId( node, TidyTag_IMG )
 
#define nodeIsMAP(node)    TagIsId( node, TidyTag_MAP )
 
#define nodeIsAREA(node)    TagIsId( node, TidyTag_AREA )
 
#define nodeIsNOBR(node)    TagIsId( node, TidyTag_NOBR )
 
#define nodeIsWBR(node)    TagIsId( node, TidyTag_WBR )
 
#define nodeIsFONT(node)    TagIsId( node, TidyTag_FONT )
 
#define nodeIsLAYER(node)    TagIsId( node, TidyTag_LAYER )
 
#define nodeIsSPACER(node)    TagIsId( node, TidyTag_SPACER )
 
#define nodeIsCENTER(node)    TagIsId( node, TidyTag_CENTER )
 
#define nodeIsSTYLE(node)    TagIsId( node, TidyTag_STYLE )
 
#define nodeIsSCRIPT(node)    TagIsId( node, TidyTag_SCRIPT )
 
#define nodeIsNOSCRIPT(node)    TagIsId( node, TidyTag_NOSCRIPT )
 
#define nodeIsFORM(node)    TagIsId( node, TidyTag_FORM )
 
#define nodeIsTEXTAREA(node)    TagIsId( node, TidyTag_TEXTAREA )
 
#define nodeIsBLOCKQUOTE(node)   TagIsId( node, TidyTag_BLOCKQUOTE )
 
#define nodeIsAPPLET(node)    TagIsId( node, TidyTag_APPLET )
 
#define nodeIsOBJECT(node)    TagIsId( node, TidyTag_OBJECT )
 
#define nodeIsDIV(node)    TagIsId( node, TidyTag_DIV )
 
#define nodeIsSPAN(node)    TagIsId( node, TidyTag_SPAN )
 
#define nodeIsINPUT(node)    TagIsId( node, TidyTag_INPUT )
 
#define nodeIsQ(node)    TagIsId( node, TidyTag_Q )
 
#define nodeIsLABEL(node)    TagIsId( node, TidyTag_LABEL )
 
#define nodeIsH3(node)    TagIsId( node, TidyTag_H3 )
 
#define nodeIsH4(node)    TagIsId( node, TidyTag_H4 )
 
#define nodeIsH5(node)    TagIsId( node, TidyTag_H5 )
 
#define nodeIsH6(node)    TagIsId( node, TidyTag_H6 )
 
#define nodeIsADDRESS(node)    TagIsId( node, TidyTag_ADDRESS )
 
#define nodeIsXMP(node)    TagIsId( node, TidyTag_XMP )
 
#define nodeIsSELECT(node)    TagIsId( node, TidyTag_SELECT )
 
#define nodeIsBLINK(node)    TagIsId( node, TidyTag_BLINK )
 
#define nodeIsMARQUEE(node)    TagIsId( node, TidyTag_MARQUEE )
 
#define nodeIsEMBED(node)    TagIsId( node, TidyTag_EMBED )
 
#define nodeIsBASEFONT(node)    TagIsId( node, TidyTag_BASEFONT )
 
#define nodeIsISINDEX(node)    TagIsId( node, TidyTag_ISINDEX )
 
#define nodeIsS(node)    TagIsId( node, TidyTag_S )
 
#define nodeIsSTRIKE(node)    TagIsId( node, TidyTag_STRIKE )
 
#define nodeIsSUB(node)    TagIsId( node, TidyTag_SUB )
 
#define nodeIsSUP(node)    TagIsId( node, TidyTag_SUP )
 
#define nodeIsU(node)    TagIsId( node, TidyTag_U )
 
#define nodeIsMENU(node)    TagIsId( node, TidyTag_MENU )
 
#define nodeIsMAIN(node)    TagIsId( node, TidyTag_MAIN )
 
#define nodeIsBUTTON(node)    TagIsId( node, TidyTag_BUTTON )
 
#define nodeIsCANVAS(node)    TagIsId( node, TidyTag_CANVAS )
 
#define nodeIsPROGRESS(node)    TagIsId( node, TidyTag_PROGRESS )
 
#define nodeIsINS(node)    TagIsId( node, TidyTag_INS )
 
#define nodeIsDEL(node)    TagIsId( node, TidyTag_DEL )
 
#define nodeIsDATALIST(node)    TagIsId( node, TidyTag_DATALIST )
 
#define nodeIsMATHML(node)    TagIsId( node, TidyTag_MATHML ) /* #130 MathML attr and entity fix! */
 
#define nodeIsACRONYM(node)    TagIsId( node, TidyTag_ACRONYM )
 
#define nodesIsFRAME(node)    TagIsId( node, TidyTag_FRAME )
 
#define nodeIsTT(node)    TagIsId( node, TidyTag_TT )
 

Data Structure Documentation

struct _Dict

Defines a dictionary entry for a single Tidy tag, including all of the relevant information that it requires.

Data Fields
AttrVersion const * attrvers Accumulates potential HTML versions for attributes.
CheckAttribs * chkattrs Specifies the function to check this tag's attributes.
TidyTagId id Identifier for this tag.
uint model Indicates the relevant content models for the tag.

See lexer.h; there is no enum.

tmbstr name The tag name.
Dict * next Link to next tag.
Parser * parser Specifies the parser to use for this tag.
uint versions Accumulates potential HTML versions.

See TY_(ConstrainVersion).

struct DictHash

This structure provide hash lookup for Tidy tags.

Data Fields
struct _DictHash * next The next tag.
Dict const * tag The current tag.
struct TidyTagImpl

This structure consists of the lists of all tags known to Tidy.

Data Fields
Dict * declared_tag_list User-declared tags.
DictHash * hashtab[ELEMENT_HASH_SIZE] All of Tidy's built-in tags.
Dict * xml_tags Placeholder for all xml tags.

Macro Definition Documentation

#define nodeIsA (   node)    TagIsId( node, TidyTag_A )
#define nodeIsACRONYM (   node)    TagIsId( node, TidyTag_ACRONYM )
#define nodeIsADDRESS (   node)    TagIsId( node, TidyTag_ADDRESS )
#define nodeIsAPPLET (   node)    TagIsId( node, TidyTag_APPLET )
#define nodeIsAREA (   node)    TagIsId( node, TidyTag_AREA )
#define nodeIsB (   node)    TagIsId( node, TidyTag_B )
#define nodeIsBASE (   node)    TagIsId( node, TidyTag_BASE )
#define nodeIsBASEFONT (   node)    TagIsId( node, TidyTag_BASEFONT )
#define nodeIsBIG (   node)    TagIsId( node, TidyTag_BIG )
#define nodeIsBLINK (   node)    TagIsId( node, TidyTag_BLINK )
#define nodeIsBLOCKQUOTE (   node)    TagIsId( node, TidyTag_BLOCKQUOTE )
#define nodeIsBODY (   node)    TagIsId( node, TidyTag_BODY )
#define nodeIsBR (   node)    TagIsId( node, TidyTag_BR )
#define nodeIsBUTTON (   node)    TagIsId( node, TidyTag_BUTTON )
#define nodeIsCANVAS (   node)    TagIsId( node, TidyTag_CANVAS )
#define nodeIsCAPTION (   node)    TagIsId( node, TidyTag_CAPTION )
#define nodeIsCENTER (   node)    TagIsId( node, TidyTag_CENTER )
#define nodeIsCOL (   node)    TagIsId( node, TidyTag_COL )
#define nodeIsCOLGROUP (   node)    TagIsId( node, TidyTag_COLGROUP )
#define nodeIsDATALIST (   node)    TagIsId( node, TidyTag_DATALIST )
#define nodeIsDD (   node)    TagIsId( node, TidyTag_DD )
#define nodeIsDEL (   node)    TagIsId( node, TidyTag_DEL )
#define nodeIsDIR (   node)    TagIsId( node, TidyTag_DIR )
#define nodeIsDIV (   node)    TagIsId( node, TidyTag_DIV )
#define nodeIsDL (   node)    TagIsId( node, TidyTag_DL )
#define nodeIsDT (   node)    TagIsId( node, TidyTag_DT )
#define nodeIsEM (   node)    TagIsId( node, TidyTag_EM )
#define nodeIsEMBED (   node)    TagIsId( node, TidyTag_EMBED )
#define nodeIsFONT (   node)    TagIsId( node, TidyTag_FONT )
#define nodeIsFORM (   node)    TagIsId( node, TidyTag_FORM )
#define nodeIsFRAME (   node)    TagIsId( node, TidyTag_FRAME )
#define nodeIsFRAMESET (   node)    TagIsId( node, TidyTag_FRAMESET )
#define nodeIsH1 (   node)    TagIsId( node, TidyTag_H1 )
#define nodeIsH2 (   node)    TagIsId( node, TidyTag_H2 )
#define nodeIsH3 (   node)    TagIsId( node, TidyTag_H3 )
#define nodeIsH4 (   node)    TagIsId( node, TidyTag_H4 )
#define nodeIsH5 (   node)    TagIsId( node, TidyTag_H5 )
#define nodeIsH6 (   node)    TagIsId( node, TidyTag_H6 )
#define nodeIsHEAD (   node)    TagIsId( node, TidyTag_HEAD )
#define nodeIsHR (   node)    TagIsId( node, TidyTag_HR )
#define nodeIsHTML (   node)    TagIsId( node, TidyTag_HTML )
#define nodeIsI (   node)    TagIsId( node, TidyTag_I )
#define nodeIsIFRAME (   node)    TagIsId( node, TidyTag_IFRAME )
#define nodeIsIMG (   node)    TagIsId( node, TidyTag_IMG )
#define nodeIsINPUT (   node)    TagIsId( node, TidyTag_INPUT )
#define nodeIsINS (   node)    TagIsId( node, TidyTag_INS )
#define nodeIsISINDEX (   node)    TagIsId( node, TidyTag_ISINDEX )
#define nodeIsLABEL (   node)    TagIsId( node, TidyTag_LABEL )
#define nodeIsLAYER (   node)    TagIsId( node, TidyTag_LAYER )
#define nodeIsLI (   node)    TagIsId( node, TidyTag_LI )
#define nodeIsLINK (   node)    TagIsId( node, TidyTag_LINK )
#define nodeIsLISTING (   node)    TagIsId( node, TidyTag_LISTING )
#define nodeIsMAIN (   node)    TagIsId( node, TidyTag_MAIN )
#define nodeIsMAP (   node)    TagIsId( node, TidyTag_MAP )
#define nodeIsMARQUEE (   node)    TagIsId( node, TidyTag_MARQUEE )
#define nodeIsMATHML (   node)    TagIsId( node, TidyTag_MATHML ) /* #130 MathML attr and entity fix! */
#define nodeIsMENU (   node)    TagIsId( node, TidyTag_MENU )
#define nodeIsMETA (   node)    TagIsId( node, TidyTag_META )
#define nodeIsNOBR (   node)    TagIsId( node, TidyTag_NOBR )
#define nodeIsNOFRAMES (   node)    TagIsId( node, TidyTag_NOFRAMES )
#define nodeIsNOSCRIPT (   node)    TagIsId( node, TidyTag_NOSCRIPT )
#define nodeIsOBJECT (   node)    TagIsId( node, TidyTag_OBJECT )
#define nodeIsOL (   node)    TagIsId( node, TidyTag_OL )
#define nodeIsOPTGROUP (   node)    TagIsId( node, TidyTag_OPTGROUP )
#define nodeIsOPTION (   node)    TagIsId( node, TidyTag_OPTION )
#define nodeIsP (   node)    TagIsId( node, TidyTag_P )
#define nodeIsPARAM (   node)    TagIsId( node, TidyTag_PARAM )
#define nodeIsPRE (   node)    TagIsId( node, TidyTag_PRE )
#define nodeIsPROGRESS (   node)    TagIsId( node, TidyTag_PROGRESS )
#define nodeIsQ (   node)    TagIsId( node, TidyTag_Q )
#define nodeIsS (   node)    TagIsId( node, TidyTag_S )
#define nodeIsSCRIPT (   node)    TagIsId( node, TidyTag_SCRIPT )
#define nodeIsSELECT (   node)    TagIsId( node, TidyTag_SELECT )
#define nodeIsSMALL (   node)    TagIsId( node, TidyTag_SMALL )
#define nodeIsSPACER (   node)    TagIsId( node, TidyTag_SPACER )
#define nodeIsSPAN (   node)    TagIsId( node, TidyTag_SPAN )
#define nodeIsSTRIKE (   node)    TagIsId( node, TidyTag_STRIKE )
#define nodeIsSTRONG (   node)    TagIsId( node, TidyTag_STRONG )
#define nodeIsSTYLE (   node)    TagIsId( node, TidyTag_STYLE )
#define nodeIsSUB (   node)    TagIsId( node, TidyTag_SUB )
#define nodeIsSUP (   node)    TagIsId( node, TidyTag_SUP )
#define nodeIsTABLE (   node)    TagIsId( node, TidyTag_TABLE )
#define nodeIsTD (   node)    TagIsId( node, TidyTag_TD )
#define nodeIsTEXTAREA (   node)    TagIsId( node, TidyTag_TEXTAREA )
#define nodeIsTH (   node)    TagIsId( node, TidyTag_TH )
#define nodeIsTITLE (   node)    TagIsId( node, TidyTag_TITLE )
#define nodeIsTR (   node)    TagIsId( node, TidyTag_TR )
#define nodeIsTT (   node)    TagIsId( node, TidyTag_TT )
#define nodeIsU (   node)    TagIsId( node, TidyTag_U )
#define nodeIsUL (   node)    TagIsId( node, TidyTag_UL )
#define nodeIsWBR (   node)    TagIsId( node, TidyTag_WBR )
#define nodeIsXMP (   node)    TagIsId( node, TidyTag_XMP )
#define nodesIsFRAME (   node)    TagIsId( node, TidyTag_FRAME )
#define TagId (   node)    ((node) && (node)->tag ? (node)->tag->id : TidyTag_UNKNOWN)

Gets the TidyTagId of the given node.

0 == TidyTag_UNKNOWN.

#define TagIsId (   node,
  tid 
)    ((node) && (node)->tag && (node)->tag->id == tid)

Determines if the given node is of the given tag id type.

Typedef Documentation

typedef void( CheckAttribs) (TidyDocImpl *doc, Node *node)

This typedef describes a function be be used to check the attributes of a Tidy tag.

typedef void( Parser) (TidyDocImpl *doc, Node *node, GetTokenMode mode)

This typedef describes a function to be used to parse HTML of a Tidy tag.

Enumeration Type Documentation

anonymous enum

This enum indicates the maximum size of the has table for tag hash lookup.

Enumerator
ELEMENT_HASH_SIZE 

Maximum number of tags in the hash table.

This enumeration defines the types of user-defined tags that can be created.

Enumerator
tagtype_null 

First item marker.

tagtype_empty 

Tag is an empty element.

tagtype_inline 

Tag is an inline element.

tagtype_block 

Tag is a block level element.

tagtype_pre 

Tag is a preformatted tag.

Function Documentation

void TY_❪AdjustTags❫ ( TidyDocImpl *  doc)

Tidy defaults to HTML5 mode.

If the <!DOCTYPE ...> is found to NOT be HTML5, then adjust the tags table to HTML4 mode.

Parameters
docThe Tidy document.
void TY_❪DeclareUserTag❫ ( TidyDocImpl *  doc,
const TidyOptionImpl *  opt,
ctmbstr  name 
)

Coordinates Config update and Tags data.

Parameters
docThe Tidy document.
optThe option the tag is intended for.
nameThe name of the new tag.
void TY_❪DefineTag❫ ( TidyDocImpl *  doc,
UserTagType  tagType,
ctmbstr  name 
)

Defines a new user-defined tag.

Parameters
docThe Tidy document.
tagTypeThe type of user-defined tag to define.
nameThe name of the new tag.
Bool TY_❪elementIsAutonomousCustomFormat❫ ( ctmbstr  element)

Inquires whether the given element looks like it's an autonomous custom element tag.

Parameters
elementA string to be checked.
Returns
The status of the inquiry.
Parser* TY_❪FindParser❫ ( TidyDocImpl *  doc,
Node *  node 
)

Finds the parser function for a given node.

Parameters
docThe Tidy document.
nodeThe node to lookup.
Returns
The parser for the given node.
Bool TY_❪FindTag❫ ( TidyDocImpl *  doc,
Node *  node 
)

Assigns the node's tag.

Parameters
docThe Tidy document.
nodeThe node to assign the tag to.
Returns
Returns a bool indicating whether or not the tag was assigned.
void TY_❪FreeDeclaredTags❫ ( TidyDocImpl *  doc,
UserTagType  tagType 
)

Frees user-defined tags of the given type, or all user tags in given tagtype_null.

Parameters
docThe Tidy document.
tagTypeThe type of tag to free, or tagtype_null to free all user-defined tags.
void TY_❪FreeTags❫ ( TidyDocImpl *  doc)

Frees the tags and structures used by Tidy for tags.

Parameters
docThe Tidy document.
TidyIterator TY_❪GetDeclaredTagList❫ ( TidyDocImpl *  doc)

Initiates an iterator for a list of user-declared tags, including autonomous custom tags detected in the document if TidyUseCustomTags is not set to no.

Parameters
docAn instance of a TidyDocImp to query.
Returns
Returns a TidyIterator, which is a token used to represent the current position in a list within LibTidy.
ctmbstr TY_❪GetNextDeclaredTag❫ ( TidyDocImpl *  doc,
UserTagType  tagType,
TidyIterator *  iter 
)

Given a valid TidyIterator initiated with TY_(GetDeclaredTagList)(), returns a string representing a user-declared or autonomous custom tag.

Remarks
Specifying tagType limits the scope of the tags to one of UserTagType types. Note that autonomous custom tags (if used) are added to one of these option types, depending on the value of TidyUseCustomTags.
Parameters
docThe Tidy document.
tagTypeThe type of tag to iterate through.
iterThe iterator token provided initially by TY_(GetDeclaredTagList)().
Returns
A string containing the next tag.
void TY_❪InitTags❫ ( TidyDocImpl *  doc)

Initializes tags and tag structures for the given Tidy document.

Parameters
docThe Tidy document.
Bool TY_❪IsHTML5Mode❫ ( TidyDocImpl *  doc)

Indicates whether or not the Tidy is procesing in HTML5 mode.

Parameters
docThe Tidy document.
Returns
Returns yes if processing in HTML5 mode.
const Dict* TY_❪LookupTagDef❫ ( TidyTagId  tid)

Interface for finding a tag by TidyTagId.

Parameters
tidThe TidyTagId to search for.
Returns
An instance of a Tidy tag.
Bool TY_❪nodeCMIsBlock❫ ( Node *  node)

Does the content model of the node include block?

Parameters
nodeThe node being interrogated.
Returns
The status of the inquiry.
Bool TY_❪nodeCMIsEmpty❫ ( Node *  node)

Does the content model of the node include empty?

Parameters
nodeThe node being interrogated.
Returns
The status of the inquiry.
Bool TY_❪nodeCMIsInline❫ ( Node *  node)

Does the content model of the node include inline?

Parameters
nodeThe node being interrogated.
Returns
The status of the inquiry.
Bool TY_❪nodeHasCM❫ ( Node *  node,
uint  contentModel 
)

Does the node have the indicated content model? True if any of the bits requested are set.

Parameters
nodeThe node being interrogated.
contentModelThe content model to check against.
Returns
The status of the inquiry.
Bool TY_❪nodeHasText❫ ( TidyDocImpl *  doc,
Node *  node 
)

Inquires whether or not the given node has any text.

Parameters
docThe Tidy document.
nodeThe node being interrogated.
Returns
The status of the inquiry.
uint TY_❪nodeHeaderLevel❫ ( Node *  node)

Inquires as to the header level of the given node: 1, 2, ..., 6.

Parameters
nodeThe node being interrogated.
Returns
The header level.
Bool TY_❪nodeIsAutonomousCustomFormat❫ ( Node *  node)

Inquires whether the given node looks like it's an autonomous custom element tag.

Parameters
nodeThe node being interrogated.
Returns
The status of the inquiry.
Bool TY_❪nodeIsAutonomousCustomTag❫ ( TidyDocImpl *  doc,
Node *  node 
)

True if the node looks like it's an autonomous custom element tag, and TidyCustomTags is not disabled, and we're in HTML5 mode, which are all requirements for valid autonomous custom tags.

Parameters
docThe Tidy document.
nodeThe node being interrogated.
Returns
The status of the inquiry.
Bool TY_❪nodeIsElement❫ ( Node *  node)

Inquires whether or not the given node is an element node.

Parameters
nodeThe node being interrogated.
Returns
The status of the inquiry.
Bool TY_❪nodeIsHeader❫ ( Node *  node)

Is the node a header, such as H1, H2, ..., H6?

Parameters
nodeThe node being interrogated.
Returns
The status of the inquiry.
Bool TY_❪nodeIsText❫ ( Node *  node)

Inquires whether or not the given node is a text node.

Parameters
nodeThe node being interrogated.
Returns
The status of the inquiry.
void TY_❪ResetTags❫ ( TidyDocImpl *  doc)

Reset the tags table back to default HTML5 mode.

Parameters
docThe Tidy document.

Variable Documentation

CheckAttribs TY_❪CheckAttributes❫
Parser TY_❪ParseBlock❫
Parser TY_❪ParseBody❫
Parser TY_❪ParseColGroup❫
Parser TY_❪ParseDatalist❫
Parser TY_❪ParseDefList❫
Parser TY_❪ParseEmpty❫
Parser TY_❪ParseFrameSet❫
Parser TY_❪ParseHead❫
Parser TY_❪ParseHTML❫
Parser TY_❪ParseInline❫
Parser TY_❪ParseList❫
Parser TY_❪ParseNamespace❫
Parser TY_❪ParseNoFrames❫
Parser TY_❪ParseOptGroup❫
Parser TY_❪ParsePre❫
Parser TY_❪ParseRowGroup❫
Parser TY_❪ParseRow❫
Parser TY_❪ParseScript❫
Parser TY_❪ParseSelect❫
Parser TY_❪ParseTableTag❫
Parser TY_❪ParseText❫
Parser TY_❪ParseTitle❫