HTML Tidy  5.9.15
The HTACG Tidy HTML Project
attrs.h
Go to the documentation of this file.
1 #ifndef __ATTRS_H__
2 #define __ATTRS_H__
3 
4 /* attrs.h -- recognize HTML attributes
5 
6  (c) 1998-2007 (W3C) MIT, ERCIM, Keio University
7  See tidy.h for the copyright notice.
8 
9 */
10 
11 #include "forward.h"
12 
13 /* declaration for methods that check attribute values */
14 typedef void (AttrCheck)(TidyDocImpl* doc, Node *node, AttVal *attval);
15 
16 struct _Attribute
17 {
21 
22  struct _Attribute* next;
23 };
24 
25 
26 /*
27  Anchor/Node linked list
28 */
29 
30 struct _Anchor
31 {
32  struct _Anchor *next;
33  Node *node;
34  char *name;
35 };
36 
37 typedef struct _Anchor Anchor;
38 
39 enum
40 {
42 };
43 
44 struct _AttrHash
45 {
46  Attribute const* attr;
47  struct _AttrHash* next;
48 };
49 
50 typedef struct _AttrHash AttrHash;
51 
52 enum
53 {
54  ANCHOR_HASH_SIZE=1021u
55 };
56 
57 /* Keeps a list of attributes that are sorted ahead of the others. */
58 typedef struct _priorityAttribs {
63 
65 {
66  /* anchor/node lookup */
68 
69  /* Declared literal attributes */
70  Attribute* declared_attr_list;
71 
72  /* Prioritized list of attributes to write */
74 
76 };
77 
78 typedef struct _TidyAttribImpl TidyAttribImpl;
79 
80 #define XHTML_NAMESPACE "http://www.w3.org/1999/xhtml"
81 
83 
84 /* public method for finding attribute definition by name */
85 TY_PRIVATE const Attribute* TY_(CheckAttribute)( TidyDocImpl* doc, Node *node, AttVal *attval );
86 
87 TY_PRIVATE const Attribute* TY_(FindAttribute)( TidyDocImpl* doc, AttVal *attval );
88 
89 TY_PRIVATE AttVal* TY_(GetAttrByName)( Node *node, ctmbstr name );
90 
91 TY_PRIVATE void TY_(DropAttrByName)( TidyDocImpl* doc, Node *node, ctmbstr name );
92 
93 TY_PRIVATE AttVal* TY_(AddAttribute)( TidyDocImpl* doc,
94  Node *node, ctmbstr name, ctmbstr value );
95 
96 TY_PRIVATE AttVal* TY_(RepairAttrValue)(TidyDocImpl* doc, Node* node, ctmbstr name, ctmbstr value);
97 
98 /* Add an item to the list of priority attributes to write first. */
99 TY_PRIVATE void TY_(DefinePriorityAttribute)(TidyDocImpl* doc, ctmbstr name);
100 
101 /* Start an iterator for priority attributes. */
102 TY_PRIVATE TidyIterator TY_(getPriorityAttrList)( TidyDocImpl* doc );
103 
104 /* Get the next priority attribute. */
105 TY_PRIVATE ctmbstr TY_(getNextPriorityAttr)( TidyDocImpl* doc, TidyIterator* iter );
106 
107 TY_PRIVATE Bool TY_(IsUrl)( TidyDocImpl* doc, ctmbstr attrname );
108 
109 /* Bool IsBool( TidyDocImpl* doc, ctmbstr attrname ); */
110 
111 TY_PRIVATE Bool TY_(IsScript)( TidyDocImpl* doc, ctmbstr attrname );
112 
113 /* may id or name serve as anchor? */
114 TY_PRIVATE Bool TY_(IsAnchorElement)( TidyDocImpl* doc, Node* node );
115 
116 /*
117  In CSS1, selectors can contain only the characters A-Z, 0-9, and
118  Unicode characters 161-255, plus dash (-); they cannot start with
119  a dash or a digit; they can also contain escaped characters and any
120  Unicode character as a numeric code (see next item).
121 
122  The backslash followed by at most four hexadecimal digits (0..9A..F)
123  stands for the Unicode character with that number.
124 
125  Any character except a hexadecimal digit can be escaped to remove its
126  special meaning, by putting a backslash in front.
127 
128  #508936 - CSS class naming for -clean option
129 */
130 TY_PRIVATE Bool TY_(IsCSS1Selector)( ctmbstr buf );
131 
132 TY_PRIVATE Bool TY_(IsValidHTMLID)(ctmbstr id);
133 TY_PRIVATE Bool TY_(IsValidXMLID)(ctmbstr id);
134 
135 /* removes anchor for specific node */
136 TY_PRIVATE void TY_(RemoveAnchorByNode)( TidyDocImpl* doc, ctmbstr name, Node *node );
137 
138 /* free all anchors */
139 TY_PRIVATE void TY_(FreeAnchors)( TidyDocImpl* doc );
140 
141 
142 /* public methods for inititializing/freeing attribute dictionary */
143 TY_PRIVATE void TY_(InitAttrs)( TidyDocImpl* doc );
144 TY_PRIVATE void TY_(FreeAttrTable)( TidyDocImpl* doc );
145 
146 TY_PRIVATE void TY_(FreeAttrPriorityList)( TidyDocImpl* doc );
147 
148 TY_PRIVATE void TY_(AppendToClassAttr)( TidyDocImpl* doc, AttVal *classattr, ctmbstr classname );
149 /*
150  the same attribute name can't be used
151  more than once in each element
152 */
153 TY_PRIVATE void TY_(RepairDuplicateAttributes)( TidyDocImpl* doc, Node* node, Bool isXml );
154 TY_PRIVATE void TY_(SortAttributes)(TidyDocImpl* doc, Node* node, TidyAttrSortStrategy strat);
155 
156 TY_PRIVATE Bool TY_(IsBoolAttribute)( AttVal* attval );
157 TY_PRIVATE Bool TY_(attrIsEvent)( AttVal* attval );
158 
159 TY_PRIVATE AttVal* TY_(AttrGetById)( Node* node, TidyAttrId id );
160 
161 TY_PRIVATE uint TY_(NodeAttributeVersions)( Node* node, TidyAttrId id );
162 
163 TY_PRIVATE Bool TY_(AttributeIsProprietary)(Node* node, AttVal* attval);
164 TY_PRIVATE Bool TY_(AttributeIsMismatched)(Node* node, AttVal* attval, TidyDocImpl* doc);
165 
166 
167 /* 0 == TidyAttr_UNKNOWN */
168 #define AttrId(av) ((av) && (av)->dict ? (av)->dict->id : TidyAttr_UNKNOWN)
169 #define AttrIsId(av, atid) ((av) && (av)->dict && ((av)->dict->id == atid))
170 
171 #define AttrHasValue(attr) ((attr) && (attr)->value)
172 #define AttrValueIs(attr, val) (AttrHasValue(attr) && \
173  TY_(tmbstrcasecmp)((attr)->value, val) == 0)
174 #define AttrContains(attr, val) (AttrHasValue(attr) && \
175  TY_(tmbsubstr)((attr)->value, val) != NULL)
176 #define AttrVersions(attr) ((attr) && (attr)->dict ? (attr)->dict->versions : VERS_PROPRIETARY)
177 
178 #define AttrsHaveSameId(a, b) (a && b && a->dict && b->dict && a->dict->id && \
179  b->dict->id && a->dict->id == b->dict->id)
180 
181 #define attrIsABBR(av) AttrIsId( av, TidyAttr_ABBR )
182 #define attrIsACCEPT(av) AttrIsId( av, TidyAttr_ACCEPT )
183 #define attrIsACCEPT_CHARSET(av) AttrIsId( av, TidyAttr_ACCEPT_CHARSET )
184 #define attrIsACCESSKEY(av) AttrIsId( av, TidyAttr_ACCESSKEY )
185 #define attrIsACTION(av) AttrIsId( av, TidyAttr_ACTION )
186 #define attrIsADD_DATE(av) AttrIsId( av, TidyAttr_ADD_DATE )
187 #define attrIsALIGN(av) AttrIsId( av, TidyAttr_ALIGN )
188 #define attrIsALINK(av) AttrIsId( av, TidyAttr_ALINK )
189 #define attrIsALT(av) AttrIsId( av, TidyAttr_ALT )
190 #define attrIsARCHIVE(av) AttrIsId( av, TidyAttr_ARCHIVE )
191 #define attrIsAXIS(av) AttrIsId( av, TidyAttr_AXIS )
192 #define attrIsBACKGROUND(av) AttrIsId( av, TidyAttr_BACKGROUND )
193 #define attrIsBGCOLOR(av) AttrIsId( av, TidyAttr_BGCOLOR )
194 #define attrIsBGPROPERTIES(av) AttrIsId( av, TidyAttr_BGPROPERTIES )
195 #define attrIsBORDER(av) AttrIsId( av, TidyAttr_BORDER )
196 #define attrIsBORDERCOLOR(av) AttrIsId( av, TidyAttr_BORDERCOLOR )
197 #define attrIsBOTTOMMARGIN(av) AttrIsId( av, TidyAttr_BOTTOMMARGIN )
198 #define attrIsCELLPADDING(av) AttrIsId( av, TidyAttr_CELLPADDING )
199 #define attrIsCELLSPACING(av) AttrIsId( av, TidyAttr_CELLSPACING )
200 #define attrIsCHARSET(av) AttrIsId( av, TidyAttr_CHARSET )
201 #define attrIsCHAR(av) AttrIsId( av, TidyAttr_CHAR )
202 #define attrIsCHAROFF(av) AttrIsId( av, TidyAttr_CHAROFF )
203 #define attrIsCHARSET(av) AttrIsId( av, TidyAttr_CHARSET )
204 #define attrIsCHECKED(av) AttrIsId( av, TidyAttr_CHECKED )
205 #define attrIsCITE(av) AttrIsId( av, TidyAttr_CITE )
206 #define attrIsCLASS(av) AttrIsId( av, TidyAttr_CLASS )
207 #define attrIsCLASSID(av) AttrIsId( av, TidyAttr_CLASSID )
208 #define attrIsCLEAR(av) AttrIsId( av, TidyAttr_CLEAR )
209 #define attrIsCODE(av) AttrIsId( av, TidyAttr_CODE )
210 #define attrIsCODEBASE(av) AttrIsId( av, TidyAttr_CODEBASE )
211 #define attrIsCODETYPE(av) AttrIsId( av, TidyAttr_CODETYPE )
212 #define attrIsCOLOR(av) AttrIsId( av, TidyAttr_COLOR )
213 #define attrIsCOLS(av) AttrIsId( av, TidyAttr_COLS )
214 #define attrIsCOLSPAN(av) AttrIsId( av, TidyAttr_COLSPAN )
215 #define attrIsCOMPACT(av) AttrIsId( av, TidyAttr_COMPACT )
216 #define attrIsCONTENT(av) AttrIsId( av, TidyAttr_CONTENT )
217 #define attrIsCOORDS(av) AttrIsId( av, TidyAttr_COORDS )
218 #define attrIsDATA(av) AttrIsId( av, TidyAttr_DATA )
219 #define attrIsDATAFLD(av) AttrIsId( av, TidyAttr_DATAFLD )
220 #define attrIsDATAFORMATAS(av) AttrIsId( av, TidyAttr_DATAFORMATAS )
221 #define attrIsDATAPAGESIZE(av) AttrIsId( av, TidyAttr_DATAPAGESIZE )
222 #define attrIsDATASRC(av) AttrIsId( av, TidyAttr_DATASRC )
223 #define attrIsDATETIME(av) AttrIsId( av, TidyAttr_DATETIME )
224 #define attrIsDECLARE(av) AttrIsId( av, TidyAttr_DECLARE )
225 #define attrIsDEFER(av) AttrIsId( av, TidyAttr_DEFER )
226 #define attrIsDIR(av) AttrIsId( av, TidyAttr_DIR )
227 #define attrIsDISABLED(av) AttrIsId( av, TidyAttr_DISABLED )
228 #define attrIsENCODING(av) AttrIsId( av, TidyAttr_ENCODING )
229 #define attrIsENCTYPE(av) AttrIsId( av, TidyAttr_ENCTYPE )
230 #define attrIsFACE(av) AttrIsId( av, TidyAttr_FACE )
231 #define attrIsFOR(av) AttrIsId( av, TidyAttr_FOR )
232 #define attrIsFRAME(av) AttrIsId( av, TidyAttr_FRAME )
233 #define attrIsFRAMEBORDER(av) AttrIsId( av, TidyAttr_FRAMEBORDER )
234 #define attrIsFRAMESPACING(av) AttrIsId( av, TidyAttr_FRAMESPACING )
235 #define attrIsGRIDX(av) AttrIsId( av, TidyAttr_GRIDX )
236 #define attrIsGRIDY(av) AttrIsId( av, TidyAttr_GRIDY )
237 #define attrIsHEADERS(av) AttrIsId( av, TidyAttr_HEADERS )
238 #define attrIsHEIGHT(av) AttrIsId( av, TidyAttr_HEIGHT )
239 #define attrIsHREF(av) AttrIsId( av, TidyAttr_HREF )
240 #define attrIsHREFLANG(av) AttrIsId( av, TidyAttr_HREFLANG )
241 #define attrIsHSPACE(av) AttrIsId( av, TidyAttr_HSPACE )
242 #define attrIsHTTP_EQUIV(av) AttrIsId( av, TidyAttr_HTTP_EQUIV )
243 #define attrIsID(av) AttrIsId( av, TidyAttr_ID )
244 #define attrIsISMAP(av) AttrIsId( av, TidyAttr_ISMAP )
245 #define attrIsITEMID(av) AttrIsId( av, TidyAttr_ITEMID )
246 #define attrIsITEMPROP(av) AttrIsId( av, TidyAttr_ITEMPROP )
247 #define attrIsITEMREF(av) AttrIsId( av, TidyAttr_ITEMREF )
248 #define attrIsITEMSCOPE(av) AttrIsId( av, TidyAttr_ITEMSCOPE )
249 #define attrIsITEMTYPE(av) AttrIsId( av, TidyAttr_ITEMTYPE )
250 #define attrIsLABEL(av) AttrIsId( av, TidyAttr_LABEL )
251 #define attrIsLANG(av) AttrIsId( av, TidyAttr_LANG )
252 #define attrIsLANGUAGE(av) AttrIsId( av, TidyAttr_LANGUAGE )
253 #define attrIsLAST_MODIFIED(av) AttrIsId( av, TidyAttr_LAST_MODIFIED )
254 #define attrIsLAST_VISIT(av) AttrIsId( av, TidyAttr_LAST_VISIT )
255 #define attrIsLEFTMARGIN(av) AttrIsId( av, TidyAttr_LEFTMARGIN )
256 #define attrIsLINK(av) AttrIsId( av, TidyAttr_LINK )
257 #define attrIsLONGDESC(av) AttrIsId( av, TidyAttr_LONGDESC )
258 #define attrIsLOWSRC(av) AttrIsId( av, TidyAttr_LOWSRC )
259 #define attrIsMARGINHEIGHT(av) AttrIsId( av, TidyAttr_MARGINHEIGHT )
260 #define attrIsMARGINWIDTH(av) AttrIsId( av, TidyAttr_MARGINWIDTH )
261 #define attrIsMAXLENGTH(av) AttrIsId( av, TidyAttr_MAXLENGTH )
262 #define attrIsMEDIA(av) AttrIsId( av, TidyAttr_MEDIA )
263 #define attrIsMETHOD(av) AttrIsId( av, TidyAttr_METHOD )
264 #define attrIsMULTIPLE(av) AttrIsId( av, TidyAttr_MULTIPLE )
265 #define attrIsNAME(av) AttrIsId( av, TidyAttr_NAME )
266 #define attrIsNOHREF(av) AttrIsId( av, TidyAttr_NOHREF )
267 #define attrIsNORESIZE(av) AttrIsId( av, TidyAttr_NORESIZE )
268 #define attrIsNOSHADE(av) AttrIsId( av, TidyAttr_NOSHADE )
269 #define attrIsNOWRAP(av) AttrIsId( av, TidyAttr_NOWRAP )
270 #define attrIsOBJECT(av) AttrIsId( av, TidyAttr_OBJECT )
271 #define attrIsOnAFTERUPDATE(av) AttrIsId( av, TidyAttr_OnAFTERUPDATE )
272 #define attrIsOnBEFOREUNLOAD(av) AttrIsId( av, TidyAttr_OnBEFOREUNLOAD )
273 #define attrIsOnBEFOREUPDATE(av) AttrIsId( av, TidyAttr_OnBEFOREUPDATE )
274 #define attrIsOnBLUR(av) AttrIsId( av, TidyAttr_OnBLUR )
275 #define attrIsOnCHANGE(av) AttrIsId( av, TidyAttr_OnCHANGE )
276 #define attrIsOnCLICK(av) AttrIsId( av, TidyAttr_OnCLICK )
277 #define attrIsOnDATAAVAILABLE(av) AttrIsId( av, TidyAttr_OnDATAAVAILABLE )
278 #define attrIsOnDATASETCHANGED(av) AttrIsId( av, TidyAttr_OnDATASETCHANGED )
279 #define attrIsOnDATASETCOMPLETE(av) AttrIsId( av, TidyAttr_OnDATASETCOMPLETE )
280 #define attrIsOnDBLCLICK(av) AttrIsId( av, TidyAttr_OnDBLCLICK )
281 #define attrIsOnERRORUPDATE(av) AttrIsId( av, TidyAttr_OnERRORUPDATE )
282 #define attrIsOnFOCUS(av) AttrIsId( av, TidyAttr_OnFOCUS )
283 #define attrIsOnKEYDOWN(av) AttrIsId( av, TidyAttr_OnKEYDOWN )
284 #define attrIsOnKEYPRESS(av) AttrIsId( av, TidyAttr_OnKEYPRESS )
285 #define attrIsOnKEYUP(av) AttrIsId( av, TidyAttr_OnKEYUP )
286 #define attrIsOnLOAD(av) AttrIsId( av, TidyAttr_OnLOAD )
287 #define attrIsOnMOUSEDOWN(av) AttrIsId( av, TidyAttr_OnMOUSEDOWN )
288 #define attrIsOnMOUSEMOVE(av) AttrIsId( av, TidyAttr_OnMOUSEMOVE )
289 #define attrIsOnMOUSEOUT(av) AttrIsId( av, TidyAttr_OnMOUSEOUT )
290 #define attrIsOnMOUSEOVER(av) AttrIsId( av, TidyAttr_OnMOUSEOVER )
291 #define attrIsOnMOUSEUP(av) AttrIsId( av, TidyAttr_OnMOUSEUP )
292 #define attrIsOnRESET(av) AttrIsId( av, TidyAttr_OnRESET )
293 #define attrIsOnROWENTER(av) AttrIsId( av, TidyAttr_OnROWENTER )
294 #define attrIsOnROWEXIT(av) AttrIsId( av, TidyAttr_OnROWEXIT )
295 #define attrIsOnSELECT(av) AttrIsId( av, TidyAttr_OnSELECT )
296 #define attrIsOnSUBMIT(av) AttrIsId( av, TidyAttr_OnSUBMIT )
297 #define attrIsOnUNLOAD(av) AttrIsId( av, TidyAttr_OnUNLOAD )
298 #define attrIsPROFILE(av) AttrIsId( av, TidyAttr_PROFILE )
299 #define attrIsPROMPT(av) AttrIsId( av, TidyAttr_PROMPT )
300 #define attrIsRBSPAN(av) AttrIsId( av, TidyAttr_RBSPAN )
301 #define attrIsREADONLY(av) AttrIsId( av, TidyAttr_READONLY )
302 #define attrIsREL(av) AttrIsId( av, TidyAttr_REL )
303 #define attrIsREV(av) AttrIsId( av, TidyAttr_REV )
304 #define attrIsRIGHTMARGIN(av) AttrIsId( av, TidyAttr_RIGHTMARGIN )
305 #define attrIsROLE(av) AttrIsId( av, TidyAttr_ROLE )
306 #define attrIsROWS(av) AttrIsId( av, TidyAttr_ROWS )
307 #define attrIsROWSPAN(av) AttrIsId( av, TidyAttr_ROWSPAN )
308 #define attrIsRULES(av) AttrIsId( av, TidyAttr_RULES )
309 #define attrIsSCHEME(av) AttrIsId( av, TidyAttr_SCHEME )
310 #define attrIsSCOPE(av) AttrIsId( av, TidyAttr_SCOPE )
311 #define attrIsSCROLLING(av) AttrIsId( av, TidyAttr_SCROLLING )
312 #define attrIsSELECTED(av) AttrIsId( av, TidyAttr_SELECTED )
313 #define attrIsSHAPE(av) AttrIsId( av, TidyAttr_SHAPE )
314 #define attrIsSHOWGRID(av) AttrIsId( av, TidyAttr_SHOWGRID )
315 #define attrIsSHOWGRIDX(av) AttrIsId( av, TidyAttr_SHOWGRIDX )
316 #define attrIsSHOWGRIDY(av) AttrIsId( av, TidyAttr_SHOWGRIDY )
317 #define attrIsSIZE(av) AttrIsId( av, TidyAttr_SIZE )
318 #define attrIsSLOT(av) AttrIsId( av, TidyAttr_SLOT )
319 #define attrIsSPAN(av) AttrIsId( av, TidyAttr_SPAN )
320 #define attrIsSRC(av) AttrIsId( av, TidyAttr_SRC )
321 #define attrIsSTANDBY(av) AttrIsId( av, TidyAttr_STANDBY )
322 #define attrIsSTART(av) AttrIsId( av, TidyAttr_START )
323 #define attrIsSTYLE(av) AttrIsId( av, TidyAttr_STYLE )
324 #define attrIsSUMMARY(av) AttrIsId( av, TidyAttr_SUMMARY )
325 #define attrIsTABINDEX(av) AttrIsId( av, TidyAttr_TABINDEX )
326 #define attrIsTARGET(av) AttrIsId( av, TidyAttr_TARGET )
327 #define attrIsTEXT(av) AttrIsId( av, TidyAttr_TEXT )
328 #define attrIsTITLE(av) AttrIsId( av, TidyAttr_TITLE )
329 #define attrIsTOPMARGIN(av) AttrIsId( av, TidyAttr_TOPMARGIN )
330 #define attrIsTYPE(av) AttrIsId( av, TidyAttr_TYPE )
331 #define attrIsUSEMAP(av) AttrIsId( av, TidyAttr_USEMAP )
332 #define attrIsVALIGN(av) AttrIsId( av, TidyAttr_VALIGN )
333 #define attrIsVALUE(av) AttrIsId( av, TidyAttr_VALUE )
334 #define attrIsVALUETYPE(av) AttrIsId( av, TidyAttr_VALUETYPE )
335 #define attrIsVERSION(av) AttrIsId( av, TidyAttr_VERSION )
336 #define attrIsVLINK(av) AttrIsId( av, TidyAttr_VLINK )
337 #define attrIsVSPACE(av) AttrIsId( av, TidyAttr_VSPACE )
338 #define attrIsWIDTH(av) AttrIsId( av, TidyAttr_WIDTH )
339 #define attrIsWRAP(av) AttrIsId( av, TidyAttr_WRAP )
340 #define attrIsXMLNS(av) AttrIsId( av, TidyAttr_XMLNS )
341 #define attrIsXML_LANG(av) AttrIsId( av, TidyAttr_XML_LANG )
342 #define attrIsXML_SPACE(av) AttrIsId( av, TidyAttr_XML_SPACE )
343 #define attrIsARIA_ACTIVEDESCENDANT(av) AttrIsId( av, TidyAttr_ARIA_ACTIVEDESCENDANT )
344 #define attrIsARIA_ATOMIC(av) AttrIsId( av, TidyAttr_ARIA_ATOMIC )
345 #define attrIsARIA_AUTOCOMPLETE(av) AttrIsId( av, TidyAttr_ARIA_AUTOCOMPLETE )
346 #define attrIsARIA_BUSY(av) AttrIsId( av, TidyAttr_ARIA_BUSY )
347 #define attrIsARIA_CHECKED(av) AttrIsId( av, TidyAttr_ARIA_CHECKED )
348 #define attrIsARIA_CONTROLS(av) AttrIsId( av, TidyAttr_ARIA_CONTROLS )
349 #define attrIsARIA_DESCRIBEDBY(av) AttrIsId( av, TidyAttr_ARIA_DESCRIBEDBY )
350 #define attrIsARIA_DISABLED(av) AttrIsId( av, TidyAttr_ARIA_DISABLED )
351 #define attrIsARIA_DROPEFFECT(av) AttrIsId( av, TidyAttr_ARIA_DROPEFFECT )
352 #define attrIsARIA_EXPANDED(av) AttrIsId( av, TidyAttr_ARIA_EXPANDED )
353 #define attrIsARIA_FLOWTO(av) AttrIsId( av, TidyAttr_ARIA_FLOWTO )
354 #define attrIsARIA_GRABBED(av) AttrIsId( av, TidyAttr_ARIA_GRABBED )
355 #define attrIsARIA_HASPOPUP(av) AttrIsId( av, TidyAttr_ARIA_HASPOPUP )
356 #define attrIsARIA_HIDDEN(av) AttrIsId( av, TidyAttr_ARIA_HIDDEN )
357 #define attrIsARIA_INVALID(av) AttrIsId( av, TidyAttr_ARIA_INVALID )
358 #define attrIsARIA_LABEL(av) AttrIsId( av, TidyAttr_ARIA_LABEL )
359 #define attrIsARIA_LABELLEDBY(av) AttrIsId( av, TidyAttr_ARIA_LABELLEDBY )
360 #define attrIsARIA_LEVEL(av) AttrIsId( av, TidyAttr_ARIA_LEVEL )
361 #define attrIsARIA_LIVE(av) AttrIsId( av, TidyAttr_ARIA_LIVE )
362 #define attrIsARIA_MULTILINE(av) AttrIsId( av, TidyAttr_ARIA_MULTILINE )
363 #define attrIsARIA_MULTISELECTABLE(av) AttrIsId( av, TidyAttr_ARIA_MULTISELECTABLE )
364 #define attrIsARIA_ORIENTATION(av) AttrIsId( av, TidyAttr_ARIA_ORIENTATION )
365 #define attrIsARIA_OWNS(av) AttrIsId( av, TidyAttr_ARIA_OWNS )
366 #define attrIsARIA_POSINSET(av) AttrIsId( av, TidyAttr_ARIA_POSINSET )
367 #define attrIsARIA_PRESSED(av) AttrIsId( av, TidyAttr_ARIA_PRESSED )
368 #define attrIsARIA_READONLY(av) AttrIsId( av, TidyAttr_ARIA_READONLY )
369 #define attrIsARIA_RELEVANT(av) AttrIsId( av, TidyAttr_ARIA_RELEVANT )
370 #define attrIsARIA_REQUIRED(av) AttrIsId( av, TidyAttr_ARIA_REQUIRED )
371 #define attrIsARIA_SELECTED(av) AttrIsId( av, TidyAttr_ARIA_SELECTED )
372 #define attrIsARIA_SETSIZE(av) AttrIsId( av, TidyAttr_ARIA_SETSIZE )
373 #define attrIsARIA_SORT(av) AttrIsId( av, TidyAttr_ARIA_SORT )
374 #define attrIsARIA_VALUEMAX(av) AttrIsId( av, TidyAttr_ARIA_VALUEMAX )
375 #define attrIsARIA_VALUEMIN(av) AttrIsId( av, TidyAttr_ARIA_VALUEMIN )
376 #define attrIsARIA_VALUENOW(av) AttrIsId( av, TidyAttr_ARIA_VALUENOW )
377 #define attrIsARIA_VALUETEXT(av) AttrIsId( av, TidyAttr_ARIA_VALUETEXT )
378 #define attrIsSVG_FILL(av) AttrIsId( av, TidyAttr_FILL )
379 #define attrIsSVG_FILLRULE(av) AttrIsId( av, TidyAttr_FILLRULE )
380 #define attrIsSVG_STROKE(av) AttrIsId( av, TidyAttr_STROKE )
381 #define attrIsSVG_STROKEDASHARRAY(av) AttrIsId( av, TidyAttr_STROKEDASHARRAY )
382 #define attrIsSVG_STROKEDASHOFFSET(av) AttrIsId( av, TidyAttr_STROKEDASHOFFSET )
383 #define attrIsSVG_STROKELINECAP(av) AttrIsId( av, TidyAttr_STROKELINECAP )
384 #define attrIsSVG_STROKELINEJOIN(av) AttrIsId( av, TidyAttr_STROKELINEJOIN )
385 #define attrIsSVG_STROKEMITERLIMIT(av) AttrIsId( av, TidyAttr_STROKEMITERLIMIT )
386 #define attrIsSVG_STROKEWIDTH(av) AttrIsId( av, TidyAttr_STROKEWIDTH )
387 #define attrIsSVG_COLORINTERPOLATION(a) AttrIsId( a, TidyAttr_COLORINTERPOLATION )
388 #define attrIsSVG_COLORRENDERING(av) AttrIsId( av, TidyAttr_COLORRENDERING )
389 #define attrIsSVG_OPACITY(av) AttrIsId( av, TidyAttr_OPACITY )
390 #define attrIsSVG_STROKEOPACITY(av) AttrIsId( av, TidyAttr_STROKEOPACITY )
391 #define attrIsSVG_FILLOPACITY(av) AttrIsId( av, TidyAttr_FILLOPACITY )
392 
393 /* Attribute Retrieval macros
394 */
395 #define attrGetHREF( nod ) TY_(AttrGetById)( nod, TidyAttr_HREF )
396 #define attrGetSRC( nod ) TY_(AttrGetById)( nod, TidyAttr_SRC )
397 #define attrGetID( nod ) TY_(AttrGetById)( nod, TidyAttr_ID )
398 #define attrGetNAME( nod ) TY_(AttrGetById)( nod, TidyAttr_NAME )
399 #define attrGetSUMMARY( nod ) TY_(AttrGetById)( nod, TidyAttr_SUMMARY )
400 #define attrGetALT( nod ) TY_(AttrGetById)( nod, TidyAttr_ALT )
401 #define attrGetLONGDESC( nod ) TY_(AttrGetById)( nod, TidyAttr_LONGDESC )
402 #define attrGetUSEMAP( nod ) TY_(AttrGetById)( nod, TidyAttr_USEMAP )
403 #define attrGetISMAP( nod ) TY_(AttrGetById)( nod, TidyAttr_ISMAP )
404 #define attrGetLANGUAGE( nod ) TY_(AttrGetById)( nod, TidyAttr_LANGUAGE )
405 #define attrGetTYPE( nod ) TY_(AttrGetById)( nod, TidyAttr_TYPE )
406 #define attrGetVALUE( nod ) TY_(AttrGetById)( nod, TidyAttr_VALUE )
407 #define attrGetCONTENT( nod ) TY_(AttrGetById)( nod, TidyAttr_CONTENT )
408 #define attrGetTITLE( nod ) TY_(AttrGetById)( nod, TidyAttr_TITLE )
409 #define attrGetXMLNS( nod ) TY_(AttrGetById)( nod, TidyAttr_XMLNS )
410 #define attrGetDATAFLD( nod ) TY_(AttrGetById)( nod, TidyAttr_DATAFLD )
411 #define attrGetWIDTH( nod ) TY_(AttrGetById)( nod, TidyAttr_WIDTH )
412 #define attrGetHEIGHT( nod ) TY_(AttrGetById)( nod, TidyAttr_HEIGHT )
413 #define attrGetFOR( nod ) TY_(AttrGetById)( nod, TidyAttr_FOR )
414 #define attrGetSELECTED( nod ) TY_(AttrGetById)( nod, TidyAttr_SELECTED )
415 #define attrGetCHARSET( nod ) TY_(AttrGetById)( nod, TidyAttr_CHARSET )
416 #define attrGetCHECKED( nod ) TY_(AttrGetById)( nod, TidyAttr_CHECKED )
417 #define attrGetLANG( nod ) TY_(AttrGetById)( nod, TidyAttr_LANG )
418 #define attrGetTARGET( nod ) TY_(AttrGetById)( nod, TidyAttr_TARGET )
419 #define attrGetHTTP_EQUIV( nod ) TY_(AttrGetById)( nod, TidyAttr_HTTP_EQUIV )
420 #define attrGetREL( nod ) TY_(AttrGetById)( nod, TidyAttr_REL )
421 
422 #define attrGetOnMOUSEMOVE( nod ) TY_(AttrGetById)( nod, TidyAttr_OnMOUSEMOVE )
423 #define attrGetOnMOUSEDOWN( nod ) TY_(AttrGetById)( nod, TidyAttr_OnMOUSEDOWN )
424 #define attrGetOnMOUSEUP( nod ) TY_(AttrGetById)( nod, TidyAttr_OnMOUSEUP )
425 #define attrGetOnCLICK( nod ) TY_(AttrGetById)( nod, TidyAttr_OnCLICK )
426 #define attrGetOnMOUSEOVER( nod ) TY_(AttrGetById)( nod, TidyAttr_OnMOUSEOVER )
427 #define attrGetOnMOUSEOUT( nod ) TY_(AttrGetById)( nod, TidyAttr_OnMOUSEOUT )
428 #define attrGetOnKEYDOWN( nod ) TY_(AttrGetById)( nod, TidyAttr_OnKEYDOWN )
429 #define attrGetOnKEYUP( nod ) TY_(AttrGetById)( nod, TidyAttr_OnKEYUP )
430 #define attrGetOnKEYPRESS( nod ) TY_(AttrGetById)( nod, TidyAttr_OnKEYPRESS )
431 #define attrGetOnFOCUS( nod ) TY_(AttrGetById)( nod, TidyAttr_OnFOCUS )
432 #define attrGetOnBLUR( nod ) TY_(AttrGetById)( nod, TidyAttr_OnBLUR )
433 
434 #define attrGetBGCOLOR( nod ) TY_(AttrGetById)( nod, TidyAttr_BGCOLOR )
435 
436 #define attrGetLINK( nod ) TY_(AttrGetById)( nod, TidyAttr_LINK )
437 #define attrGetALINK( nod ) TY_(AttrGetById)( nod, TidyAttr_ALINK )
438 #define attrGetVLINK( nod ) TY_(AttrGetById)( nod, TidyAttr_VLINK )
439 
440 #define attrGetTEXT( nod ) TY_(AttrGetById)( nod, TidyAttr_TEXT )
441 #define attrGetSTYLE( nod ) TY_(AttrGetById)( nod, TidyAttr_STYLE )
442 #define attrGetABBR( nod ) TY_(AttrGetById)( nod, TidyAttr_ABBR )
443 #define attrGetCOLSPAN( nod ) TY_(AttrGetById)( nod, TidyAttr_COLSPAN )
444 #define attrGetFONT( nod ) TY_(AttrGetById)( nod, TidyAttr_FONT )
445 #define attrGetBASEFONT( nod ) TY_(AttrGetById)( nod, TidyAttr_BASEFONT )
446 #define attrGetROWSPAN( nod ) TY_(AttrGetById)( nod, TidyAttr_ROWSPAN )
447 
448 #define attrGetROLE( nod ) TY_(AttrGetById)( nod, TidyAttr_ROLE )
449 
450 #define attrGetARIA_ACTIVEDESCENDANT( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_ACTIVEDESCENDANT )
451 #define attrGetARIA_ATOMIC( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_ATOMIC )
452 #define attrGetARIA_AUTOCOMPLETE( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_AUTOCOMPLETE )
453 #define attrGetARIA_BUSY( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_BUSY )
454 #define attrGetARIA_CHECKED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_CHECKED )
455 #define attrGetARIA_CONTROLS( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_CONTROLS )
456 #define attrGetARIA_DESCRIBEDBY( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_DESCRIBEDBY )
457 #define attrGetARIA_DISABLED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_DISABLED )
458 #define attrGetARIA_DROPEFFECT( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_DROPEFFECT )
459 #define attrGetARIA_EXPANDED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_EXPANDED )
460 #define attrGetARIA_FLOWTO( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_FLOWTO )
461 #define attrGetARIA_GRABBED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_GRABBED )
462 #define attrGetARIA_HASPOPUP( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_HASPOPUP )
463 #define attrGetARIA_HIDDEN( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_HIDDEN )
464 #define attrGetARIA_INVALID( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_INVALID )
465 #define attrGetARIA_LABEL( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_LABEL )
466 #define attrGetARIA_LABELLEDBY( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_LABELLEDBY )
467 #define attrGetARIA_LEVEL( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_LEVEL )
468 #define attrGetARIA_LIVE( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_LIVE )
469 #define attrGetARIA_MULTILINE( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_MULTILINE )
470 #define attrGetARIA_MULTISELECTABLE( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_MULTISELECTABLE )
471 #define attrGetARIA_ORIENTATION( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_ORIENTATION )
472 #define attrGetARIA_OWNS( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_OWNS )
473 #define attrGetARIA_POSINSET( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_POSINSET )
474 #define attrGetARIA_PRESSED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_PRESSED )
475 #define attrGetARIA_READONLY( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_READONLY )
476 #define attrGetARIA_RELEVANT( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_RELEVANT )
477 #define attrGetARIA_REQUIRED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_REQUIRED )
478 #define attrGetARIA_SELECTED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_SELECTED )
479 #define attrGetARIA_SETSIZE( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_SETSIZE )
480 #define attrGetARIA_SORT( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_SORT )
481 #define attrGetARIA_VALUEMAX( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_VALUEMAX )
482 #define attrGetARIA_VALUEMIN( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_VALUEMIN )
483 #define attrGetARIA_VALUENOW( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_VALUENOW )
484 #define attrGetARIA_VALUETEXT( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_VALUETEXT )
485 
486 #endif /* __ATTRS_H__ */
PriorityAttribs priorityAttribs
Definition: attrs.h:73
tmbstr * list
Definition: attrs.h:59
void() AttrCheck(TidyDocImpl *doc, Node *node, AttVal *attval)
Definition: attrs.h:14
char * name
Definition: attrs.h:34
struct _Attribute * next
Definition: attrs.h:22
struct _AttrHash * next
Definition: attrs.h:47
uint capacity
Definition: attrs.h:61
TidyAttrId id
Definition: attrs.h:18
AttrHash * hashtab[ATTRIBUTE_HASH_SIZE]
Definition: attrs.h:75
Attribute const * attr
Definition: attrs.h:46
Attribute * declared_attr_list
Definition: attrs.h:70
@ ANCHOR_HASH_SIZE
Definition: attrs.h:54
struct _Anchor * next
Definition: attrs.h:32
uint count
Definition: attrs.h:60
Node * node
Definition: attrs.h:33
@ ATTRIBUTE_HASH_SIZE
Definition: attrs.h:41
AttrCheck * attrchk
Definition: attrs.h:20
Anchor * anchor_hash[ANCHOR_HASH_SIZE]
Definition: attrs.h:67
tmbstr name
Definition: attrs.h:19
Definition: attrs.h:58
Definition: attrs.h:31
Definition: attrs.h:45
Definition: attrs.h:17
Definition: attrs.h:65
#define TY_PRIVATE
Definition: forward.h:29
#define TY_(str)
Definition: forward.h:23
TidyAttrId
Known HTML attributes.
Definition: tidyenum.h:1020
TidyAttrSortStrategy
Mode controlling treatment of sorting attributes.
Definition: tidyenum.h:812
Bool
Definition: tidyplatform.h:662
unsigned int uint
Definition: tidyplatform.h:576
const tmbchar * ctmbstr
Definition: tidyplatform.h:624
tmbchar * tmbstr
Definition: tidyplatform.h:623