source: dev/trunk/abdev/ProjectEditor/HtmlAnalysis.cpp@ 383

Last change on this file since 383 was 3, checked in by dai_9181, 18 years ago
File size: 18.8 KB
Line 
1#include "common.h"
2
3extern COMPLEMENT_WINDOW_INFO ComplementWndInfo;
4
5#define ADD_TAG_PARAM(str) AddComplimentInfo(str,ACCESS_HTML_PARAM);
6
7int IsHtmlTagWord(char *str){
8 if(str[0]=='a'||str[0]=='A'){
9 if(lstrcmpi(str,"a")==0) return 1;
10 if(lstrcmpi(str,"abbr")==0) return 1;
11 if(lstrcmpi(str,"acronym")==0) return 1;
12 if(lstrcmpi(str,"address")==0) return 1;
13 if(lstrcmpi(str,"applet")==0) return 1;
14 if(lstrcmpi(str,"area")==0) return 1;
15 }
16 else if(str[0]=='b'||str[0]=='B'){
17 if(lstrcmpi(str,"b")==0) return 1;
18 if(lstrcmpi(str,"base")==0) return 1;
19 if(lstrcmpi(str,"basefont")==0) return 1;
20 if(lstrcmpi(str,"bdo")==0) return 1;
21 if(lstrcmpi(str,"bgsound")==0) return 1;
22 if(lstrcmpi(str,"big")==0) return 1;
23 if(lstrcmpi(str,"blink")==0) return 1;
24 if(lstrcmpi(str,"blockquote")==0) return 1;
25 if(lstrcmpi(str,"body")==0) return 1;
26 if(lstrcmpi(str,"br")==0) return 1;
27 if(lstrcmpi(str,"button")==0) return 1;
28 }
29 else if(str[0]=='c'||str[0]=='C'){
30 if(lstrcmpi(str,"caption")==0) return 1;
31 if(lstrcmpi(str,"center")==0) return 1;
32 if(lstrcmpi(str,"cite")==0) return 1;
33 if(lstrcmpi(str,"code")==0) return 1;
34 if(lstrcmpi(str,"col")==0) return 1;
35 if(lstrcmpi(str,"colgroup")==0) return 1;
36 if(lstrcmpi(str,"comment")==0) return 1;
37 }
38 else if(str[0]=='d'||str[0]=='D'){
39 if(lstrcmpi(str,"dd")==0) return 1;
40 if(lstrcmpi(str,"del")==0) return 1;
41 if(lstrcmpi(str,"dfn")==0) return 1;
42 if(lstrcmpi(str,"dir")==0) return 1;
43 if(lstrcmpi(str,"div")==0) return 1;
44 if(lstrcmpi(str,"dl")==0) return 1;
45 if(lstrcmpi(str,"dt")==0) return 1;
46 }
47 else if(str[0]=='e'||str[0]=='E'){
48 if(lstrcmpi(str,"em")==0) return 1;
49 if(lstrcmpi(str,"embed")==0) return 1;
50 }
51 else if(str[0]=='f'||str[0]=='F'){
52 if(lstrcmpi(str,"fieldset")==0) return 1;
53 if(lstrcmpi(str,"font")==0) return 1;
54 if(lstrcmpi(str,"form")==0) return 1;
55 if(lstrcmpi(str,"frame")==0) return 1;
56 if(lstrcmpi(str,"frameset")==0) return 1;
57 }
58 else if(str[0]=='h'||str[0]=='H'){
59 if(lstrcmpi(str,"h1")==0) return 1;
60 if(lstrcmpi(str,"h2")==0) return 1;
61 if(lstrcmpi(str,"h3")==0) return 1;
62 if(lstrcmpi(str,"h4")==0) return 1;
63 if(lstrcmpi(str,"h5")==0) return 1;
64 if(lstrcmpi(str,"h6")==0) return 1;
65 if(lstrcmpi(str,"head")==0) return 1;
66 if(lstrcmpi(str,"hr")==0) return 1;
67 if(lstrcmpi(str,"html")==0) return 1;
68 }
69 else if(str[0]=='i'||str[0]=='I'){
70 if(lstrcmpi(str,"i")==0) return 1;
71 if(lstrcmpi(str,"iframe")==0) return 1;
72 if(lstrcmpi(str,"ilayer")==0) return 1;
73 if(lstrcmpi(str,"img")==0) return 1;
74 if(lstrcmpi(str,"input")==0) return 1;
75 if(lstrcmpi(str,"ins")==0) return 1;
76 if(lstrcmpi(str,"isindex")==0) return 1;
77 }
78 else if(str[0]=='k'||str[0]=='K'){
79 if(lstrcmpi(str,"kbd")==0) return 1;
80 if(lstrcmpi(str,"keygen")==0) return 1;
81 }
82 else if(str[0]=='l'||str[0]=='L'){
83 if(lstrcmpi(str,"label")==0) return 1;
84 if(lstrcmpi(str,"layer")==0) return 1;
85 if(lstrcmpi(str,"legend")==0) return 1;
86 if(lstrcmpi(str,"li")==0) return 1;
87 if(lstrcmpi(str,"link")==0) return 1;
88 if(lstrcmpi(str,"listing")==0) return 1;
89 }
90 else if(str[0]=='m'||str[0]=='M'){
91 if(lstrcmpi(str,"map")==0) return 1;
92 if(lstrcmpi(str,"marquee")==0) return 1;
93 if(lstrcmpi(str,"menu")==0) return 1;
94 if(lstrcmpi(str,"meta")==0) return 1;
95 if(lstrcmpi(str,"multicol")==0) return 1;
96 }
97 else if(str[0]=='n'||str[0]=='N'){
98 if(lstrcmpi(str,"nobr")==0) return 1;
99 if(lstrcmpi(str,"noembed")==0) return 1;
100 if(lstrcmpi(str,"noframes")==0) return 1;
101 if(lstrcmpi(str,"nolayer")==0) return 1;
102 if(lstrcmpi(str,"noscript")==0) return 1;
103 }
104 else if(str[0]=='o'||str[0]=='O'){
105 if(lstrcmpi(str,"object")==0) return 1;
106 if(lstrcmpi(str,"ol")==0) return 1;
107 if(lstrcmpi(str,"optgroup")==0) return 1;
108 if(lstrcmpi(str,"option")==0) return 1;
109 }
110 else if(str[0]=='p'||str[0]=='P'){
111 if(lstrcmpi(str,"p")==0) return 1;
112 if(lstrcmpi(str,"param")==0) return 1;
113 if(lstrcmpi(str,"plaintext")==0) return 1;
114 if(lstrcmpi(str,"pre")==0) return 1;
115 }
116 else if(str[0]=='q'||str[0]=='Q'){
117 if(lstrcmpi(str,"q")==0) return 1;
118 }
119 else if(str[0]=='r'||str[0]=='R'){
120 if(lstrcmpi(str,"rb")==0) return 1;
121 if(lstrcmpi(str,"rp")==0) return 1;
122 if(lstrcmpi(str,"rt")==0) return 1;
123 if(lstrcmpi(str,"ruby")==0) return 1;
124 }
125 else if(str[0]=='s'||str[0]=='S'){
126 if(lstrcmpi(str,"s")==0) return 1;
127 if(lstrcmpi(str,"samp")==0) return 1;
128 if(lstrcmpi(str,"script")==0) return 1;
129 if(lstrcmpi(str,"select")==0) return 1;
130 if(lstrcmpi(str,"server")==0) return 1;
131 if(lstrcmpi(str,"small")==0) return 1;
132 if(lstrcmpi(str,"span")==0) return 1;
133 if(lstrcmpi(str,"strike")==0) return 1;
134 if(lstrcmpi(str,"strong")==0) return 1;
135 if(lstrcmpi(str,"style")==0) return 1;
136 if(lstrcmpi(str,"sub")==0) return 1;
137 if(lstrcmpi(str,"sup")==0) return 1;
138 }
139 else if(str[0]=='t'||str[0]=='T'){
140 if(lstrcmpi(str,"table")==0) return 1;
141 if(lstrcmpi(str,"tbody")==0) return 1;
142 if(lstrcmpi(str,"td")==0) return 1;
143 if(lstrcmpi(str,"textarea")==0) return 1;
144 if(lstrcmpi(str,"tfoot")==0) return 1;
145 if(lstrcmpi(str,"th")==0) return 1;
146 if(lstrcmpi(str,"thead")==0) return 1;
147 if(lstrcmpi(str,"title")==0) return 1;
148 if(lstrcmpi(str,"tr")==0) return 1;
149 if(lstrcmpi(str,"tt")==0) return 1;
150 }
151 else if(str[0]=='u'||str[0]=='U'){
152 if(lstrcmpi(str,"u")==0) return 1;
153 if(lstrcmpi(str,"ul")==0) return 1;
154 }
155 else if(str[0]=='v'||str[0]=='V'){
156 if(lstrcmpi(str,"var")==0) return 1;
157 }
158 else if(str[0]=='w'||str[0]=='W'){
159 if(lstrcmpi(str,"wbr")==0) return 1;
160 }
161 else if(str[0]=='x'||str[0]=='X'){
162 if(lstrcmpi(str,"xmp")==0) return 1;
163 }
164
165
166 return 0;
167}
168int IsHtmlReservedWord(char *str){
169 return IsHtmlTagWord(str);
170}
171
172void AddComplimentInfo(char *str,DWORD dwAccess){
173 ComplementWndInfo.pMemberInfo=(MEMBERINFO *)HeapReAlloc(hHeap,0,
174 ComplementWndInfo.pMemberInfo,
175 (ComplementWndInfo.MemberNum+1)*sizeof(MEMBERINFO));
176
177 ComplementWndInfo.pMemberInfo[ComplementWndInfo.MemberNum].pName=
178 (char *)HeapAlloc(hHeap,0,lstrlen(str)+1);
179 lstrcpy(
180 ComplementWndInfo.pMemberInfo[ComplementWndInfo.MemberNum].pName,
181 str);
182
183 ComplementWndInfo.pMemberInfo[ComplementWndInfo.MemberNum].dwProc=0;
184
185 ComplementWndInfo.pMemberInfo[ComplementWndInfo.MemberNum].dwAccess=dwAccess;
186
187 ComplementWndInfo.MemberNum++;
188}
189
190BOOL GetNowTagInfo(char *buffer,int p){
191 int i,i2,i3;
192 for(i=p;i>0;i--){
193 if(buffer[i]=='\r'&&buffer[i+1]=='\n') break;
194 }
195
196 int IsStr=0;
197 char szTag[1024];
198 szTag[0]=0;
199 for(;i<p;i++){
200 if(buffer[i]=='\0') break;
201 if(buffer[i]=='<'){
202 IsStr=0;
203
204 i2=i+1;
205 while(buffer[i2]==' '||buffer[i2]=='\t') i2++;
206
207 if(IsAlphabet(buffer[i2])){
208 for(i3=0;;i2++,i3++){
209 if(!IsAlphabet(buffer[i2])){
210 szTag[i3]=0;
211 break;
212 }
213 szTag[i3]=buffer[i2];
214 }
215 }
216 else szTag[0]=0;
217 }
218 if(buffer[i]=='>'&&IsStr==0){
219 szTag[0]=0;
220 }
221
222 if(buffer[i]=='\"'&&szTag[0]){
223 //タグ内のダブルクォート
224 IsStr^=1;
225 }
226 }
227
228 if(IsStr){
229 //文字列内では補完しない
230 return 0;
231 }
232
233 if(!IsHtmlTagWord(szTag)){
234 //未登録のタグはサポートしない
235 return 0;
236 }
237
238 ComplementWndInfo.pMemberInfo=(MEMBERINFO *)HeapAlloc(hHeap,0,1);
239 ComplementWndInfo.MemberNum=0;
240
241 BOOL bUseGeneralParam=1;
242 if(lstrcmpi(szTag,"a")==0){
243 ADD_TAG_PARAM("href");
244 ADD_TAG_PARAM("name");
245 ADD_TAG_PARAM("target");
246 }
247 else if(lstrcmpi(szTag,"applet")==0){
248 ADD_TAG_PARAM("alt");
249 ADD_TAG_PARAM("archive");
250 ADD_TAG_PARAM("code");
251 ADD_TAG_PARAM("codebase");
252 ADD_TAG_PARAM("mayscript");
253 ADD_TAG_PARAM("object");
254 ADD_TAG_PARAM("src");
255 ADD_TAG_PARAM("align");
256 ADD_TAG_PARAM("height");
257 ADD_TAG_PARAM("hspace");
258 ADD_TAG_PARAM("vspace");
259 ADD_TAG_PARAM("width");
260 }
261 else if(lstrcmpi(szTag,"area")==0){
262 ADD_TAG_PARAM("shape");
263 ADD_TAG_PARAM("coords");
264 ADD_TAG_PARAM("href");
265 ADD_TAG_PARAM("alt");
266 ADD_TAG_PARAM("accesskey");
267 ADD_TAG_PARAM("nohref");
268 ADD_TAG_PARAM("hreflang");
269 ADD_TAG_PARAM("methods");
270 ADD_TAG_PARAM("rel");
271 ADD_TAG_PARAM("rev");
272 ADD_TAG_PARAM("tabindex");
273 ADD_TAG_PARAM("target");
274 }
275 else if(lstrcmpi(szTag,"base")==0){
276 ADD_TAG_PARAM("href");
277 ADD_TAG_PARAM("target");
278
279 bUseGeneralParam=0;
280 }
281 else if(lstrcmpi(szTag,"basefont")==0){
282 ADD_TAG_PARAM("size");
283 ADD_TAG_PARAM("color");
284 ADD_TAG_PARAM("face");
285 }
286 else if(lstrcmpi(szTag,"bgsound")==0){
287 ADD_TAG_PARAM("balance");
288 ADD_TAG_PARAM("loop");
289 ADD_TAG_PARAM("src");
290 ADD_TAG_PARAM("volume");
291 }
292 else if(lstrcmpi(szTag,"blockquote")==0){
293 ADD_TAG_PARAM("cite");
294 }
295 else if(lstrcmpi(szTag,"body")==0){
296 ADD_TAG_PARAM("text");
297 ADD_TAG_PARAM("link");
298 ADD_TAG_PARAM("vlink");
299 ADD_TAG_PARAM("alink");
300 ADD_TAG_PARAM("bgcolor");
301 ADD_TAG_PARAM("background");
302 ADD_TAG_PARAM("bgproperties");
303 ADD_TAG_PARAM("marginheight");
304 ADD_TAG_PARAM("marginwidth");
305 ADD_TAG_PARAM("topmargin");
306 ADD_TAG_PARAM("leftmargin");
307 ADD_TAG_PARAM("bottommargin");
308 ADD_TAG_PARAM("rightmargin");
309 ADD_TAG_PARAM("scroll");
310 }
311 else if(lstrcmpi(szTag,"br")==0){
312 ADD_TAG_PARAM("/");
313 ADD_TAG_PARAM("clear");
314 }
315 else if(lstrcmpi(szTag,"button")==0){
316 ADD_TAG_PARAM("accesskey");
317 ADD_TAG_PARAM("disabled");
318 ADD_TAG_PARAM("tabindex");
319 ADD_TAG_PARAM("type");
320 ADD_TAG_PARAM("value");
321 }
322 else if(lstrcmpi(szTag,"caption")==0){
323 ADD_TAG_PARAM("align");
324 ADD_TAG_PARAM("valign");
325 }
326 else if(lstrcmpi(szTag,"col")==0){
327 ADD_TAG_PARAM("align");
328 ADD_TAG_PARAM("bgcolor");
329 ADD_TAG_PARAM("char");
330 ADD_TAG_PARAM("charoff");
331 ADD_TAG_PARAM("span");
332 ADD_TAG_PARAM("valign");
333 ADD_TAG_PARAM("width");
334 }
335 else if(lstrcmpi(szTag,"colgroup")==0){
336 ADD_TAG_PARAM("align");
337 ADD_TAG_PARAM("bgcolor");
338 ADD_TAG_PARAM("char");
339 ADD_TAG_PARAM("charoff");
340 ADD_TAG_PARAM("span");
341 ADD_TAG_PARAM("valign");
342 ADD_TAG_PARAM("width");
343 }
344 else if(lstrcmpi(szTag,"del")==0){
345 ADD_TAG_PARAM("cite");
346 ADD_TAG_PARAM("datetime");
347 }
348 else if(lstrcmpi(szTag,"div")==0){
349 ADD_TAG_PARAM("align");
350 }
351 else if(lstrcmpi(szTag,"dl")==0){
352 ADD_TAG_PARAM("compact");
353 }
354 else if(lstrcmpi(szTag,"embed")==0){
355 ADD_TAG_PARAM("src");
356 ADD_TAG_PARAM("align");
357 ADD_TAG_PARAM("height");
358 ADD_TAG_PARAM("width");
359 ADD_TAG_PARAM("hspace");
360 ADD_TAG_PARAM("vspace");
361 ADD_TAG_PARAM("compact");
362 ADD_TAG_PARAM("units");
363 ADD_TAG_PARAM("border");
364 ADD_TAG_PARAM("frameborder");
365 ADD_TAG_PARAM("hidden");
366 ADD_TAG_PARAM("alt");
367 ADD_TAG_PARAM("code");
368 ADD_TAG_PARAM("codebase");
369 ADD_TAG_PARAM("type");
370 ADD_TAG_PARAM("palette");
371 ADD_TAG_PARAM("pluginspage");
372 ADD_TAG_PARAM("pluginurl");
373 ADD_TAG_PARAM("autostart");
374 ADD_TAG_PARAM("autoplay");
375 ADD_TAG_PARAM("control");
376 ADD_TAG_PARAM("loop");
377 ADD_TAG_PARAM("repeat");
378 ADD_TAG_PARAM("textfocus");
379 }
380 else if(lstrcmpi(szTag,"fieldset")==0){
381 ADD_TAG_PARAM("align");
382 }
383 else if(lstrcmpi(szTag,"font")==0){
384 ADD_TAG_PARAM("size");
385 ADD_TAG_PARAM("color");
386 ADD_TAG_PARAM("face");
387 }
388 else if(lstrcmpi(szTag,"form")==0){
389 ADD_TAG_PARAM("action");
390 ADD_TAG_PARAM("method");
391 ADD_TAG_PARAM("target");
392 ADD_TAG_PARAM("accept");
393 ADD_TAG_PARAM("accept-charset");
394 ADD_TAG_PARAM("autocomplete");
395 ADD_TAG_PARAM("enctype");
396 ADD_TAG_PARAM("urn");
397 }
398 else if(lstrcmpi(szTag,"frame")==0){
399 ADD_TAG_PARAM("src");
400 ADD_TAG_PARAM("height");
401 ADD_TAG_PARAM("width");
402 ADD_TAG_PARAM("bordercolor");
403 ADD_TAG_PARAM("frameborder");
404 ADD_TAG_PARAM("marginheight");
405 ADD_TAG_PARAM("marginwidth");
406 ADD_TAG_PARAM("noresize");
407 ADD_TAG_PARAM("longdesc");
408 ADD_TAG_PARAM("scrolling");
409 ADD_TAG_PARAM("allowtransparency");
410 }
411 else if(lstrcmpi(szTag,"frameset")==0){
412 ADD_TAG_PARAM("border");
413 ADD_TAG_PARAM("bordercolor");
414 ADD_TAG_PARAM("cols");
415 ADD_TAG_PARAM("frameborder");
416 ADD_TAG_PARAM("framespacing");
417 ADD_TAG_PARAM("rows");
418 }
419 else if(lstrcmpi(szTag,"h1")==0||
420 lstrcmpi(szTag,"h2")==0||
421 lstrcmpi(szTag,"h3")==0||
422 lstrcmpi(szTag,"h4")==0||
423 lstrcmpi(szTag,"h5")==0||
424 lstrcmpi(szTag,"h6")==0){
425 ADD_TAG_PARAM("align");
426 }
427 else if(lstrcmpi(szTag,"hr")==0){
428 ADD_TAG_PARAM("/");
429 ADD_TAG_PARAM("align");
430 ADD_TAG_PARAM("color");
431 ADD_TAG_PARAM("noshade");
432 ADD_TAG_PARAM("size");
433 ADD_TAG_PARAM("width");
434 }
435 else if(lstrcmpi(szTag,"iframe")==0){
436 ADD_TAG_PARAM("src");
437 ADD_TAG_PARAM("align");
438 ADD_TAG_PARAM("height");
439 ADD_TAG_PARAM("width");
440 ADD_TAG_PARAM("hspace");
441 ADD_TAG_PARAM("vspace");
442 ADD_TAG_PARAM("marginheight");
443 ADD_TAG_PARAM("marginwidth");
444 ADD_TAG_PARAM("border");
445 ADD_TAG_PARAM("bordercolor");
446 ADD_TAG_PARAM("frameborder");
447 ADD_TAG_PARAM("framespacing");
448 ADD_TAG_PARAM("longdesc");
449 ADD_TAG_PARAM("scrolling");
450 }
451 else if(lstrcmpi(szTag,"img")==0){
452 ADD_TAG_PARAM("src");
453 ADD_TAG_PARAM("alt");
454 ADD_TAG_PARAM("height");
455 ADD_TAG_PARAM("width");
456 ADD_TAG_PARAM("align");
457 ADD_TAG_PARAM("border");
458 ADD_TAG_PARAM("galleryimg");
459 ADD_TAG_PARAM("hspace");
460 ADD_TAG_PARAM("longdesc");
461 ADD_TAG_PARAM("lowsrc");
462 ADD_TAG_PARAM("suppress");
463 ADD_TAG_PARAM("vspace");
464 ADD_TAG_PARAM("ismap");
465 ADD_TAG_PARAM("usemap");
466 ADD_TAG_PARAM("controls");
467 ADD_TAG_PARAM("dynsrc");
468 ADD_TAG_PARAM("loop");
469 ADD_TAG_PARAM("start");
470 }
471 else if(lstrcmpi(szTag,"input")==0){
472 ADD_TAG_PARAM("accesskey");
473 ADD_TAG_PARAM("disabled");
474 ADD_TAG_PARAM("tabindex");
475 ADD_TAG_PARAM("type");
476 ADD_TAG_PARAM("autocomplete");
477 ADD_TAG_PARAM("istyle");
478 ADD_TAG_PARAM("maxlength");
479 ADD_TAG_PARAM("readonly");
480 ADD_TAG_PARAM("value");
481 ADD_TAG_PARAM("accept");
482 ADD_TAG_PARAM("checked");
483 ADD_TAG_PARAM("align");
484 ADD_TAG_PARAM("alt");
485 ADD_TAG_PARAM("border");
486 ADD_TAG_PARAM("dynsrc");
487 ADD_TAG_PARAM("height");
488 ADD_TAG_PARAM("ismap");
489 ADD_TAG_PARAM("lowsrc");
490 ADD_TAG_PARAM("src");
491 ADD_TAG_PARAM("width");
492 }
493 else if(lstrcmpi(szTag,"ins")==0){
494 ADD_TAG_PARAM("cite");
495 ADD_TAG_PARAM("datetime");
496 }
497 else if(lstrcmpi(szTag,"label")==0){
498 ADD_TAG_PARAM("accesskey");
499 ADD_TAG_PARAM("for");
500 }
501 else if(lstrcmpi(szTag,"legend")==0){
502 ADD_TAG_PARAM("accesskey");
503 ADD_TAG_PARAM("align");
504 }
505 else if(lstrcmpi(szTag,"li")==0){
506 ADD_TAG_PARAM("type");
507 ADD_TAG_PARAM("value");
508 }
509 else if(lstrcmpi(szTag,"link")==0){
510 ADD_TAG_PARAM("rel");
511 ADD_TAG_PARAM("href");
512 ADD_TAG_PARAM("src");
513 ADD_TAG_PARAM("charset");
514 ADD_TAG_PARAM("media");
515 ADD_TAG_PARAM("type");
516 }
517 else if(lstrcmpi(szTag,"marquee")==0){
518 ADD_TAG_PARAM("behavior");
519 ADD_TAG_PARAM("bgcolor");
520 ADD_TAG_PARAM("direction");
521 ADD_TAG_PARAM("height");
522 ADD_TAG_PARAM("hspace");
523 ADD_TAG_PARAM("loop");
524 ADD_TAG_PARAM("scrollamount");
525 ADD_TAG_PARAM("scrolldelay");
526 ADD_TAG_PARAM("truespeed");
527 ADD_TAG_PARAM("vspace");
528 ADD_TAG_PARAM("width");
529 }
530 else if(lstrcmpi(szTag,"meta")==0){
531 ADD_TAG_PARAM("name");
532 ADD_TAG_PARAM("http-equiv");
533 ADD_TAG_PARAM("content");
534 }
535 else if(lstrcmpi(szTag,"object")==0){
536 ADD_TAG_PARAM("alt");
537 ADD_TAG_PARAM("archive");
538 ADD_TAG_PARAM("border");
539 ADD_TAG_PARAM("classid");
540 ADD_TAG_PARAM("code");
541 ADD_TAG_PARAM("codebase");
542 ADD_TAG_PARAM("codetype");
543 ADD_TAG_PARAM("data");
544 ADD_TAG_PARAM("declare");
545 ADD_TAG_PARAM("name");
546 ADD_TAG_PARAM("standby");
547 ADD_TAG_PARAM("tabindex");
548 ADD_TAG_PARAM("type");
549 ADD_TAG_PARAM("usemap");
550 ADD_TAG_PARAM("align");
551 ADD_TAG_PARAM("width");
552 ADD_TAG_PARAM("height");
553 ADD_TAG_PARAM("hspace");
554 ADD_TAG_PARAM("vspace");
555 }
556 else if(lstrcmpi(szTag,"ol")==0){
557 ADD_TAG_PARAM("compact");
558 ADD_TAG_PARAM("start");
559 ADD_TAG_PARAM("type");
560 }
561 else if(lstrcmpi(szTag,"option")==0){
562 ADD_TAG_PARAM("disabled");
563 ADD_TAG_PARAM("label");
564 ADD_TAG_PARAM("selected");
565 ADD_TAG_PARAM("value");
566 }
567 else if(lstrcmpi(szTag,"p")==0){
568 ADD_TAG_PARAM("align");
569 }
570 else if(lstrcmpi(szTag,"param")==0){
571 ADD_TAG_PARAM("name");
572 ADD_TAG_PARAM("value");
573 ADD_TAG_PARAM("valuetype");
574 ADD_TAG_PARAM("type");
575 }
576 else if(lstrcmpi(szTag,"pre")==0){
577 ADD_TAG_PARAM("cols");
578 ADD_TAG_PARAM("width");
579 ADD_TAG_PARAM("wrap");
580 }
581 else if(lstrcmpi(szTag,"script")==0){
582 ADD_TAG_PARAM("charset");
583 ADD_TAG_PARAM("defer");
584 ADD_TAG_PARAM("event");
585 ADD_TAG_PARAM("for");
586 ADD_TAG_PARAM("src");
587 ADD_TAG_PARAM("type");
588 }
589 else if(lstrcmpi(szTag,"select")==0){
590 ADD_TAG_PARAM("accesskey");
591 ADD_TAG_PARAM("align");
592 ADD_TAG_PARAM("disabled");
593 ADD_TAG_PARAM("multiple");
594 ADD_TAG_PARAM("size");
595 ADD_TAG_PARAM("tabindex");
596 }
597 else if(lstrcmpi(szTag,"style")==0){
598 ADD_TAG_PARAM("disabled");
599 ADD_TAG_PARAM("media");
600 ADD_TAG_PARAM("type");
601 }
602 else if(lstrcmpi(szTag,"table")==0){
603 ADD_TAG_PARAM("border");
604 ADD_TAG_PARAM("bordercolor");
605 ADD_TAG_PARAM("bordercolordark");
606 ADD_TAG_PARAM("bordercolorlight");
607 ADD_TAG_PARAM("frame");
608 ADD_TAG_PARAM("rules");
609 ADD_TAG_PARAM("background");
610 ADD_TAG_PARAM("bgcolor");
611 ADD_TAG_PARAM("align");
612 ADD_TAG_PARAM("cellpadding");
613 ADD_TAG_PARAM("cellspacing");
614 ADD_TAG_PARAM("height");
615 ADD_TAG_PARAM("hspace");
616 ADD_TAG_PARAM("vspace");
617 ADD_TAG_PARAM("width");
618 ADD_TAG_PARAM("cols");
619 ADD_TAG_PARAM("summary");
620 }
621 else if(lstrcmpi(szTag,"tbody")==0||
622 lstrcmpi(szTag,"tfoot")==0||
623 lstrcmpi(szTag,"thead")==0){
624 ADD_TAG_PARAM("align");
625 ADD_TAG_PARAM("bgcolor");
626 ADD_TAG_PARAM("char");
627 ADD_TAG_PARAM("charoff");
628 ADD_TAG_PARAM("valign");
629 }
630 else if(lstrcmpi(szTag,"td")==0||
631 lstrcmpi(szTag,"th")==0){
632 ADD_TAG_PARAM("bordercolor");
633 ADD_TAG_PARAM("bordercolordark");
634 ADD_TAG_PARAM("bordercolorlight");
635 ADD_TAG_PARAM("background");
636 ADD_TAG_PARAM("bgcolor");
637 ADD_TAG_PARAM("align");
638 ADD_TAG_PARAM("valign");
639 ADD_TAG_PARAM("height");
640 ADD_TAG_PARAM("width");
641 ADD_TAG_PARAM("nowrap");
642 ADD_TAG_PARAM("char");
643 ADD_TAG_PARAM("charoff");
644 ADD_TAG_PARAM("colspan");
645 ADD_TAG_PARAM("rowspan");
646 ADD_TAG_PARAM("abbr");
647 ADD_TAG_PARAM("axis");
648 ADD_TAG_PARAM("headers");
649 ADD_TAG_PARAM("scope");
650 }
651 else if(lstrcmpi(szTag,"textarea")==0){
652 ADD_TAG_PARAM("accesskey");
653 ADD_TAG_PARAM("align");
654 ADD_TAG_PARAM("cols");
655 ADD_TAG_PARAM("istyle");
656 ADD_TAG_PARAM("readonly");
657 ADD_TAG_PARAM("rows");
658 ADD_TAG_PARAM("wrap");
659 ADD_TAG_PARAM("tabindex");
660 }
661 else if(lstrcmpi(szTag,"title")==0){
662 bUseGeneralParam=0;
663 }
664 else if(lstrcmpi(szTag,"tr")==0){
665 ADD_TAG_PARAM("bordercolor");
666 ADD_TAG_PARAM("bordercolordark");
667 ADD_TAG_PARAM("bordercolorlight");
668 ADD_TAG_PARAM("bgcolor");
669 ADD_TAG_PARAM("align");
670 ADD_TAG_PARAM("char");
671 ADD_TAG_PARAM("charoff");
672 ADD_TAG_PARAM("height");
673 ADD_TAG_PARAM("valign");
674 }
675 else if(lstrcmpi(szTag,"ul")==0){
676 ADD_TAG_PARAM("compact");
677 ADD_TAG_PARAM("type");
678 }
679
680
681
682
683 if(bUseGeneralParam){
684 //一般属性
685 AddComplimentInfo("class",ACCESS_HTML_GENERAL_PARAM);
686 AddComplimentInfo("id",ACCESS_HTML_GENERAL_PARAM);
687 AddComplimentInfo("style",ACCESS_HTML_GENERAL_PARAM);
688 }
689
690 return 1;
691}
Note: See TracBrowser for help on using the repository browser.